Rewrite XML with xmlstarlet

XML Starlet is a program that makes transforming XML documents really simple. The command that you need to transform an XML document is the following. 1 xmlstarlet tr [<options>] <xsl-file> {-p|-s <name>=<value>} [ <xml-file-or-uri> ... ] The XSL file that transforms a document to itself is this. It copies all elements, attributes and texts. We can extend this file to remove, add, or transform elements. 1 2 3 4 5 6 7 8 9 <?...

March 16, 2016