XML file from list

lucdrb

Active Member
Licensed User
Longtime User
HI,

I would like to make a XML file from a list.

my XML file should be like that:

<?version = 1.0 encoding = "UTF_8"?>
<liste>
<depot date= "date">
<article>NomArticle</article>
<article>NomArticle</article>
.....
</depot>
</liste>

The program make the list from 1 the multiple line of article for a specific date.
Each day it makes a new list that have to be add to the old one.
I've seen how to parse the XMlFile with XmlSax to retrieve the file.

I know that I can made a XML file from scratch but I would like to know how to make it with XML builder (add the new lines to the old one).
with a for next loop ? how?

Thanks in advance

Luc
 

lucdrb

Active Member
Licensed User
Longtime User
OK, that's what I thought, but I don't see how to create the file with XMLBuilder and an unknown number of elements ?

thanks
Luc
 
Upvote 0

mterveen

Member
Licensed User
Longtime User
when i use the following code:

B4X:
    Dim props As Map
    props.Initialize
    props.Put("indent", "yes")
    Return x.asString2(props)

(with x being my xmlbuilder variable)

and save x to a file, the data is NOT indented. what determines where the indentations are/should be?
 
Upvote 0
Top