B4X, XSD and XML Creation, Reading... the best way using them ?

Magma

Expert
Licensed User
Longtime User
Well...
I think "title" saying the story of the whole thing...

I know some languages using the XSD for creating some auto-complete code, generating paths and auto-matching some variables or database fields with elements of it...

Is there a way to create/move easily "xml" using an xsd... with a simple example, using b4x...

I am already "creating" xml files but for now i direct writting as text file... It will be nice if using XSD to create and read easier XML files..

I ve started this thread, to understand, the flow you are using at your projects and the "reason for using that flow" - already selected by you.
 

hatzisn

Expert
Licensed User
Longtime User
Although this is not an answer, probably a custom parser only and XMLBuilder library for XML Creation...
 

hatzisn

Expert
Licensed User
Longtime User
Also have a look at this:

 

hatzisn

Expert
Licensed User
Longtime User
And this:

 

Magma

Expert
Licensed User
Longtime User
Thanks for your feed... but I really wanna know the flow/way of use in B4X (no problem if it is inline java)... with a small example... to understand it better... with a use of a simple XSD...

I know that an XSD limits creation helps in validation... but i wanna see it.. in real... is it real so helpful... or i ll just lose my time using it...
 

TILogistic

Expert
Licensed User
Longtime User

aeric

Expert
Licensed User
Longtime User
I did bookmarked some of the search results but not really understood how it actually works.
 

TILogistic

Expert
Licensed User
Longtime User
I did bookmarked some of the search results but not really understood how it actually works.
An XML Schema Definition (XSD) is a framework document that defines rules and constraints for XML documents. An XSD formally describes the elements of an XML document and can be used to validate the content of the XML document to ensure that it conforms to the rules of the XSD.

 

aeric

Expert
Licensed User
Longtime User
Let say I have a B4X class that has a function to generate an XML file according to the format defined by the XSD, how do I create another function to validate the generated XML?
How does the function show the error message?
Is it like having some sort of build in API or automatically output the corresponding error message in a stack object or similar?

Edit:
It appeared that I also have bookmarked this:
Unfortunately I haven't find time to fully experiment with my own file.
 
Last edited:

TILogistic

Expert
Licensed User
Longtime User
I don't have any validation in B4X, only on the web service servers.

But it shouldn't be difficult to do a local validation in B4X that generates the XML, if you know the XSD template format.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…