Xmlstarlet: Difference between revisions
No edit summary |
No edit summary |
||
| Line 148: | Line 148: | ||
Count all nodes in a document:<code>xml sel -t -v "count(//node())" | Count all nodes in a document:<code>xml sel -t -v "count(//node())" | ||
Count all occurrences of <tt>somenode</tt> nodes:<code>xml sel -t -v "count(//somenode)"</code> | Count all occurrences of <tt>somenode</tt> nodes:<code>xml sel -t -v "count(//somenode)"</code> | ||
==See Also== | |||
* [http://xmlstar.sourceforge.net/doc/UG/index.html XmlStarlet reference] | |||