XMLStarlet is a set of command line utilities (tools) which can be used to transform, query, validate, and edit XML documents and files using simple set of shell commands in similar way it is done for plain text files using UNIX grep, sed, awk, diff, patch, join, etc commands.
The XMLStarlet set of command line utilities can be used by those who have to deal with many XML documents on a UNIX shell command prompt as well as for automated XML processing with shell scripts.
Here are some key features of "XMLStarlet":
· Check or validate XML files (simple well-formedness check, DTD, XSD, RelaxNG)
· Calculate values of XPath expressions on XML files (such as running sums, etc)
· Search XML files for matches to given XPath expressions
· Apply XSLT stylesheets to XML documents (including EXSLT support, and passing parameters to stylesheets)
· Query XML documents (ex. query for value of some elements of attributes, sorting, etc)
· Modify or edit XML documents (ex. delete some elements)
· Format or "beautify" XML documents (as changing indentation, etc)
· Fetch XML documents using http:// or ftp:// URLs
· Browse tree structure of XML documents (in similar way to 'ls' command for directories)
· Include one XML document into another using XInclude
· XML c14n canonicalization
· Escape/unescape special XML characters in input text
· Print directory as XML document
· Convert XML into PYX format (based on ESIS - ISO 8879), and vice versa
Requirements:
· libxml2
· libxslt
What's New in This Release: [ read full changelog ]
· bug fix for BSD/OSX: check that O_BINARY is declared before
· #including io.h (Bug 3211822)
· select improvements
· add --elif and --else options
· sorting on multiple fields
· correct (for English) lexical sorting instead of ASCIIbetical
· only outputs namespaces that are actually used
· only outputs xsl:param inputFile if it's used
· don't make separate templates if there is only 1
· link to shared libxml and libxslt libraries by default
· add library version info to --version output
· add directory argument for ls; exit status indicates
· failure/success instead of file count
· stop using old SAX1 interface, xmlstarlet will now link with a
· libxml configured --without-sax1 and --without-legacy