CmdID

CmdID / Commands

xml-edit

Edit an XML document. 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

Delete elements matching an XPATH from an XML document

xml [ed --delete "XPATH1" path/to/input.xmlIdentify

Move an element node of an XML document from XPATH1 to XPATH2

xml [ed --move "XPATH1" "XPATH2" path/to/input.xmlIdentify

Rename all attributes named "id" to "ID"

xml [ed --rename "//*/@id" -v "ID" path/to/input.xmlIdentify

Rename sub-elements of the element "table" that are named "rec" to "record"

xml [ed --rename "/xml/table/rec" -v "record" path/to/input.xmlIdentify

Update the XML table record with "id=3" to the value "id=5"

xml [ed --update "xml/table/rec[@id=3]/@id" --value 5 path/to/input.xmlIdentify

Display help

xml [ed --helpIdentify