On Fr, 2015-07-24 at 11:57 -0700, Chris Moody wrote: > Would it be easiest to introduce a fourth element to the XML that says > how many children the 3rd element has? Or is there an easy way already > to get this and just run a for next loop to read each child?
Maybe sth. like this would do: <counted_element count=3> <child>1>/child> <child>2>/child> <child>3>/child> </counted_element> or similar. Besides making the count an attribute of the root node of counted elements you could simply use a standard pascal loop: n: XMLNode; { this is only pseude code ... } while (xmldoc.hasMoreChilds()) do begin n := getChild(); ... process n ... end: For real code http://wiki.freepascal.org/XML_Tutorial mwill help. HTH, Marc -- Marc Santhoff <m.santh...@web.de> _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal