Tag Info

Hot answers tagged


The xmlstarlet tool will do this: xml sel -t -m /A -v id -v //C -v //D For each A under the root element, it prints the contents of id and children C and D. (Or should- I can't test it right now.). The double slashes are the XPath for "anywhere under the matched node." Source: http://www.freesoftwaremagazine.com/articles/xml_starlet Xmlstarlet: ...

Only top voted, non community-wiki answers of a minimum length are eligible