I have an xml something like
<Screen>
<window name="gui">
<widget name="status" pos="0:0">
<timedate name="timedate"/>
<message name="message"/>
</widget>
</window>
</Screen>
One good thing about this xml is that every node has unique name. It will not repeat anywhere in the xml.
To find a node, I can query using xpath and will get the result for its presence/absence, But I need to find the path traversed.
example I can search the timedate node using xpath query '//timedate', but along with this I also need the path traversed i.e. Screen/window/widget/timedate.
Please suggest me some ways to retrieve the path also.
Your help will be highly appreciated.