Overview

XMLStarlet is a set of command line utilities (tools) which can be used to transform, query, validate, and edit XML documents and files using a simple set of shell commands, in a similar way to how it is done for plain text files using UNIX grep, sed, awk, diff, patch, join, etc.

These utilities can be used by those who deal with many XML documents on a UNIX shell command prompt, as well as for automated XML processing with shell scripts.

Features

The toolkit's feature set includes options to:

Implementation

The XMLStarlet command line utility is written in C and uses libxml2 and libxslt. Its extensive set of options was only possible because of the rich feature set of libxml2 and libxslt — many thanks to the developers of those libraries for their great work.

XMLStarlet is a single command. Depending on how it was packaged it is invoked as either xml (the upstream default) or xmlstarlet (used by many distributions to avoid clashing with other tools) — run it with --help, or with no arguments, to see the list of available commands.

Standalone builds, such as the Windows release binaries, are linked statically against libxml2 and libxslt, so that one executable is all you need. Packages installed from a distribution instead link dynamically against the system libxml2 and libxslt libraries.

XMLStarlet is open source free software under the MIT license, which allows free use and distribution for both commercial and non-commercial projects.

We welcome feedback on the project. Comments, suggestions, feature requests, and bug reports can be filed on the GitHub issue tracker.