xml-select

select Select from XML documents using XPATHs. Tip: use xml…

xml select

Select from XML documents using XPATHs. Tip: use xml elements to display the XPATHs of an XML document. More information: http://xmlstar.sourceforge.net/docs.php.

xml select --template --match "{{XPATH1}}" --value-of "{{XPATH2}}" {{path/to/input.xml|URI}}

xml select --text --template --match "{{XPATH1}}" --value-of "{{XPATH2}}" --nl {{path/to/input.xml|URI}}

xml select --template --value-of "count({{XPATH1}})" {{path/to/input.xml|URI}}

xml select --text --template --inp-name --output " " --value-of "count(node())" --nl {{path/to/input1.xml|URI}} {{path/to/input2.xml|URI}}

xml select --help

Также может быть вам интересно:
КодТрюки BashНастройкиТерминал/Консоль
← xml-pyx xmlstarlet →