CmdID

CmdID / Commands

xml-select

Select from XML documents using XPATHs. tldr-pages

On several platforms

Opens CmdID with your command. It is read in your browser and sent nowhere.

Several platforms

from tldr-pages, CC BY 4.0

Select from XML documents using XPATHs. Tip: use xml elements to display the XPATHs of an XML document.

Select all elements matching "XPATH1" and print the value of their sub-element "XPATH2"

xml [sel --template --match "XPATH1" --value-of "XPATH2" path/to/input.xmlIdentify

Match "XPATH1" and print the value of "XPATH2" as text with new-lines

xml [sel --text --template --match "XPATH1" --value-of "XPATH2" --nl path/to/input.xmlIdentify

Count the elements of "XPATH1"

xml [sel --template --value-of "count(XPATH1)" path/to/input.xmlIdentify

Count all nodes in one or more XML documents

xml [sel --text --template --inp-name --output " " --value-of "count(node())" --nl path/to/input1.xml path/to/input2.xmlIdentify

Display help

xml [sel --helpIdentify