On 10/9/08, Sergei Gorelkin <[EMAIL PROTECTED]> wrote:
>
> Bart wrote:
> >
> > Then how can I free those TDOMNodeList objects? I.o.w. how can I get
> > access to them?
> >
>
> You just put them into a variable and later call Free:
>
> var
> Nodes: TDOMNodeList;
> ...
> Nodes := MyNode.ChildNodes;
> writeln(Nodes[0].NodeName);
> ...
> Nodes.Free
How should I apply that to my code-example?
> In general, any tree can be built using only the AppendChild method.
> Just put necessary nodes in variables. Here is your example:
>
> [snip]
>
I tried the examplecode, I had to replace
tmp['id'] := '0001';
with
TDOMElement(tmp).SetAttribute('id', '001');
(it would not compile otherwise: the error said something about tmp not
having a default property)
This code creates the xml-file like I wanted it.
I'm going to study the code and try to understand it.
Thanks for the help!
Bart
_______________________________________________
Lazarus mailing list
[email protected]
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus