Hi, I am writing a Python program that needs to read XML files and contruct a tree object from the XML file (using wxTree). The XML however is not an hiearchical XML file. It contains <elements> and <association> tags. The <assiociation> tags link the elements together. Example: <element1> ... element 1 attributes </element1> <element2> ... element 2 attributes </element2> <element3> ... element 3 attributes </element3> <association> <Name>element1</Name> <Parent>element3</Parent> </association> <association> <Name>element2</Name> <Parent>element3</Parent> </association>
In this case <element3> is the parent of the two other elements. The XML files I receive often contain thousands of elements so the tree structure can be very large. Futhermore, the XML files are not 'sorted', like in the example above, the 'root' element object entry might be somewhere in the middle of the XML file. I don't really now to code this so any suggestions are welcome. With kind regards, Kris -- http://mail.python.org/mailman/listinfo/python-list