I want to join the values of all the nodes that match an expression and have them separated by a comma. For example, the following xml should return "num1,num2,num3"
<products>
<product>
<id>1</id>
<other>y</other>
<notarget>x</notarget>
<target>num1</target>
<target>num2</target>
<target>num3</target>
</product>
</products>
The xpath /[name()='products']/[name()='product']/*[name()='target'] should get the elements but I just don't understand how to join them
No comments:
Post a Comment