I'm trying to do something similar to this, but I also want to include the value in it as well - theoretically I would love to just show the absolute path only if there is a value associated with it:
https://stackoverflow.com/a/10112579
For example let's say I have an XML document that looks like this:
<thing>
<attributes>
<attribute>
<guid>blah</guid>
<item1>foo</item1>
<item2>bar</item2>
</attribute>
</attributes>
</thing>
I want it to output this:
thing/attributes/attribute[1]/guid/blah
thing/attributes/attribute[1]/item1/foo
thing/attributes/attribute[1]/item2/bar