Saturday, 24 August 2013

xmlstarlet - order alternate pairs of tag values

xmlstarlet - order alternate pairs of tag values

With the this XML
<a>
<b>1</b>
<c>2</c>
<b>3</b>
<c>4</c>
</a>
I would like this output from xmlstarlet:
1 2
3 4
But with this command:
xml sel -T -t -m /a -v b -v c -n
I get:
1
32
4

No comments:

Post a Comment