1

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
Eldorian
  • 603
  • 1
  • 6
  • 18
  • This is NOT the same question being asked. I even linked to one of these articles as "I want to do this, but also add this other thing to it" Please read the whole thing and understand what is being asked before you decide to mark something as a duplicate. – Eldorian Jun 06 '18 at 21:32

0 Answers0