Environment: Windows,Python,wxpython and Element tree as xml parser.
I am developing a stand alone where it reads the xml and creates a tree.
My application reads the xml and creates tree but when xml changes next time(when DEPTH of xml increases- i mean when two child elements are added).Application fails to read(Logic fails 🙁 )
For e.g.
I have written a logic which can read any xml which has a depth of 5.But when it reads an xml with a depth more than 5 , it fails.
Please let me know how to read xml whose depth is dynamic.
You should use recursive calls, something more like:
Not all of your elements had ‘name’ attributes. So you will need to adjust this to match your exact data structure.