
xmlstarlet
List of commands for xmlstarlet:
-
xmlstarlet:ai:0f9f6 Performing addition operation on elements 123 and 456 and outputting the result$ xmlstarlet sel -t -v '123 + 456' -ntry on your machineexplain this command
-
xmlstarlet:ai:2d66f add 1 to element's value with xmlstarlet$ xmlstarlet ed -u '//element' -x 'text()' -n 'text() + 1' input.xmltry on your machineexplain this command
-
xmlstarlet:ai:69b2a perform arithmetic operations on element's value with xmlstarlet$ xmlstarlet sel -t -v '5 * 2' -ntry on your machineexplain this command
-
xmlstarlet:tldr:1338d xmlstarlet: Print all nodes that match a given XPath.$ xmlstarlet select --template --copy-of ${xpath} ${filename-xml}try on your machineexplain this command
-
xmlstarlet:tldr:3da92 xmlstarlet: Format an XML document and print to stdout.$ xmlstarlet format ${filename-xml}try on your machineexplain this command
-
xmlstarlet:tldr:47140 xmlstarlet: List a given directory as XML (omit argument to list current directory).$ xmlstarlet ls ${path-to-directory}try on your machineexplain this command
-
xmlstarlet:tldr:47832 xmlstarlet: Delete all matching nodes in place (source file is changed).$ xmlstarlet edit --inplace --delete ${xpath} ${file-xml}try on your machineexplain this command
-
xmlstarlet:tldr:7d134 xmlstarlet: XML document can also be piped from stdin.$ ${cat filename-xml} | xmlstarlet formattry on your machineexplain this command
-
xmlstarlet:tldr:9e401 xmlstarlet: Escape or unescape special XML characters in a given string.$ xmlstarlet [un]escape ${string}try on your machineexplain this command
-
xmlstarlet:tldr:9f8c5 xmlstarlet: Update the value of all matching nodes in place (source file is changed).$ xmlstarlet edit --inplace --update ${xpath} --value ${new_value} ${file-xml}try on your machineexplain this command
-
xmlstarlet:tldr:d3fcf xmlstarlet: Insert an attribute to all matching nodes, and print to stdout (source file is unchanged).$ xmlstarlet edit --insert ${xpath} --type attr --name ${attribute_name} --value ${attribute_value} ${filename-xml}try on your machineexplain this command