<br><div><span class="gmail_quote">On 10/9/08, <b class="gmail_sendername">Sergei Gorelkin</b> <<a href="mailto:sergei_gorelkin@mail.ru">sergei_gorelkin@mail.ru</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Bart wrote:<br> ><br> > Then how can I free those TDOMNodeList objects? I.o.w. how can I get<br> > access to them?<br> ><br> <br>You just put them into a variable and later call Free:<br> <br> var<br> Nodes: TDOMNodeList;<br>
...<br> Nodes := MyNode.ChildNodes;<br> writeln(Nodes[0].NodeName);<br> ...<br> Nodes.Free</blockquote><div><br>
How should I apply that to my code-example?<br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">In general, any tree can be built using only the AppendChild method.<br> Just put necessary nodes in variables. Here is your example:<br>
<br>[snip]<br>
</blockquote><div><br>
<br>
I tried the examplecode, I had to replace<br>
tmp['id'] := '0001'; <br>
with<br>
TDOMElement(tmp).SetAttribute('id', '001'); <br>
(it would not compile otherwise: the error said something about tmp not having a default property)<br>
<br>
</div>This code creates the xml-file like I wanted it.<br>
I'm going to study the code and try to understand it.<br>
<br>
Thanks for the help!<br>
<br>
Bart<br></div>