I am often working with quite complex documents that I am effectively reverse engineering. I need to write code to modify the value of certain nodes with the path traversed to reach the node acting as a condition.
When examining the XML data to understand it's structure, it would be very useful to have a representation on of this path. I can then use the path in the code to get to that specific node.
For example, I can get the representation Catalog > Book > Textbook > Author from the document below.
Are there any libraries in Python that allows me to do this?
<xml>
<Catalog>
<Book>
<Textbook>
<Author ="James" />
</Textbook>
</Book>
<Journal>
<Science>
<Author ="James" />
</Science>
</Journal>
</Catalog>
</xml>