<categoryPath>
<category>
<id>01</id>
<name>one</name>
</category>
<category>
<id>02</id>
<name>two</name>
</category>
<category>
<id>03</id>
<name>three</name>
</category>
<category>
<id>04</id>
<name>four</name>
</category>
</categoryPath>
I have a XML structure as seen above. Can anyone help me how to write XPath which can produce the below result? Please note that the number of category nodes will be dynamic and the values can be anything. The XPath should consider any number of available category elements(not fixed).
one -> two -> three -> four