xml select
Select from XML documents using XPATHs. Tip: use `xml elements` to display the XPATHs of an XML document.
More info →Options (8)
booleanSelect all elements matching "XPATH1" and print the value of their sub-element "XPATH2"
xml {{[sel|select]}} {{[-t|--template]}} {{[-m|--match]}} "{{XPATH1}}" {{[-v|--value-of]}} "{{XPATH2}}" {{path/to/input.xml|URI}}-t, --templatebooleanSelect all elements matching "XPATH1" and print the value of their sub-element "XPATH2"
xml {{[sel|select]}} {{[-t|--template]}} {{[-m|--match]}} "{{XPATH1}}" {{[-v|--value-of]}} "{{XPATH2}}" {{path/to/input.xml|URI}}-m, --matchbooleanSelect all elements matching "XPATH1" and print the value of their sub-element "XPATH2"
xml {{[sel|select]}} {{[-t|--template]}} {{[-m|--match]}} "{{XPATH1}}" {{[-v|--value-of]}} "{{XPATH2}}" {{path/to/input.xml|URI}}-v, --value-ofbooleanSelect all elements matching "XPATH1" and print the value of their sub-element "XPATH2"
xml {{[sel|select]}} {{[-t|--template]}} {{[-m|--match]}} "{{XPATH1}}" {{[-v|--value-of]}} "{{XPATH2}}" {{path/to/input.xml|URI}}-T, --textbooleanMatch "XPATH1" and print the value of "XPATH2" as text with new-lines
xml {{[sel|select]}} {{[-T|--text]}} {{[-t|--template]}} {{[-m|--match]}} "{{XPATH1}}" {{[-v|--value-of]}} "{{XPATH2}}" {{[-n|--nl]}} {{path/to/input.xml|URI}}-n, --nlbooleanMatch "XPATH1" and print the value of "XPATH2" as text with new-lines
xml {{[sel|select]}} {{[-T|--text]}} {{[-t|--template]}} {{[-m|--match]}} "{{XPATH1}}" {{[-v|--value-of]}} "{{XPATH2}}" {{[-n|--nl]}} {{path/to/input.xml|URI}}-f, --inp-namebooleanCount all nodes in one or more XML documents
xml {{[sel|select]}} {{[-T|--text]}} {{[-t|--template]}} {{[-f|--inp-name]}} {{[-o|--output]}} " " {{[-v|--value-of]}} "count(node())" {{[-n|--nl]}} {{path/to/input1.xml|URI}} {{path/to/input2.xml|URI}}-o, --outputbooleanCount all nodes in one or more XML documents
xml {{[sel|select]}} {{[-T|--text]}} {{[-t|--template]}} {{[-f|--inp-name]}} {{[-o|--output]}} " " {{[-v|--value-of]}} "count(node())" {{[-n|--nl]}} {{path/to/input1.xml|URI}} {{path/to/input2.xml|URI}}Examples (5)
Select all elements matching "XPATH1" and print the value of their sub-element "XPATH2"
xml [sel|select] [-t|--template] [-m|--match] "XPATH1" [-v|--value-of] "XPATH2" path/to/input.xml|URIMatch "XPATH1" and print the value of "XPATH2" as text with new-lines
xml [sel|select] [-T|--text] [-t|--template] [-m|--match] "XPATH1" [-v|--value-of] "XPATH2" [-n|--nl] path/to/input.xml|URICount the elements of "XPATH1"
xml [sel|select] [-t|--template] [-v|--value-of] "count(XPATH1)" path/to/input.xml|URICount all nodes in one or more XML documents
xml [sel|select] [-T|--text] [-t|--template] [-f|--inp-name] [-o|--output] " " [-v|--value-of] "count(node())" [-n|--nl] path/to/input1.xml|URI path/to/input2.xml|URIDisplay help
xml [sel|select] --help