Options (7)
booleanDelete elements matching an XPATH from an XML document
Example:
xml {{[ed|edit]}} {{[-d|--delete]}} "{{XPATH1}}" {{path/to/input.xml|URI}}-d, --deletebooleanDelete elements matching an XPATH from an XML document
Example:
xml {{[ed|edit]}} {{[-d|--delete]}} "{{XPATH1}}" {{path/to/input.xml|URI}}-m, --movebooleanMove an element node of an XML document from XPATH1 to XPATH2
Example:
xml {{[ed|edit]}} {{[-m|--move]}} "{{XPATH1}}" "{{XPATH2}}" {{path/to/input.xml|URI}}-r, --renamebooleanRename all attributes named "id" to "ID"
Example:
xml {{[ed|edit]}} {{[-r|--rename]}} "{{//*/@id}}" -v "{{ID}}" {{path/to/input.xml|URI}}-u, --updatebooleanUpdate the XML table record with "id=3" to the value "id=5"
Example:
xml {{[ed|edit]}} {{[-u|--update]}} "{{xml/table/rec[@id=3]/@id}}" {{[-v|--value]}} {{5}} {{path/to/input.xml|URI}}-v, --valuebooleanUpdate the XML table record with "id=3" to the value "id=5"
Example:
xml {{[ed|edit]}} {{[-u|--update]}} "{{xml/table/rec[@id=3]/@id}}" {{[-v|--value]}} {{5}} {{path/to/input.xml|URI}}-h, --helpbooleanDisplay help
Example:
xml {{[ed|edit]}} {{[-h|--help]}}Examples (6)
Delete elements matching an XPATH from an XML document
xml [ed|edit] [-d|--delete] "XPATH1" path/to/input.xml|URIMove an element node of an XML document from XPATH1 to XPATH2
xml [ed|edit] [-m|--move] "XPATH1" "XPATH2" path/to/input.xml|URIRename all attributes named "id" to "ID"
xml [ed|edit] [-r|--rename] "//*/@id" -v "ID" path/to/input.xml|URIRename sub-elements of the element "table" that are named "rec" to "record"
xml [ed|edit] [-r|--rename] "/xml/table/rec" -v "record" path/to/input.xml|URIUpdate the XML table record with "id=3" to the value "id=5"
xml [ed|edit] [-u|--update] "xml/table/rec[@id=3]/@id" [-v|--value] 5 path/to/input.xml|URIDisplay help
xml [ed|edit] [-h|--help]made by @shridhargupta | data from tldr-pages