Crates.io | xee |
lib.rs | xee |
version | 0.1.6 |
created_at | 2025-03-20 16:36:03.248618+00 |
updated_at | 2025-08-21 12:35:40.302866+00 |
description | Xee CLI. Swiss Army knife for XML. XPath and XSLT |
homepage | https://github.com/Paligo/xee |
repository | https://github.com/Paligo/xee |
max_upload_size | |
id | 1599455 |
size | 103,538 |
Swiss Army knife tool for XML.
The xee
(try -h
) allows you to do stuff with XML on the command line.
Features include:
This implements XPath 3.1 and parts of XSLT 3.0.
You can download a pre-build binary of xee
from the releases
page. You can also build it
yourself
if you have the Rust toolchain installed.
Execute an XPath expression /doc/p
against a file foo.xml
, result to stdout:
xee xpath /doc/p foo.xml
If you don't include the file, the XML is taken from stdin, allowing you to do:
cat foo.xml | xee xpath /doc/p
For XML with namespaces, use the --namespace
option (format: prefix=uri
):
xee xpath /doc/a:p --namespace a=http://example.com foo.xml
For multiple namespaces, repeat the option:
xee xpath /x:doc/a:p \
--namespace x=http://example.com/x \
--namespace a=http://example.com/a \
foo.xml
For XML with a default namespace, use --default-namespace-uri
:
xee xpath /doc/p --default-namespace-uri http://example.com foo.xml
Interactive shell (REPL) to issue multiple xpath expressions against a document:
xee repl
Pretty-print foo.xml
, result to stdout:
xee indent foo.xml
Transform an XML document using an XSLT stylesheet:
xee xslt stylesheet.xsl input.xml
You can also specify an output file:
xee xslt stylesheet.xsl input.xml --output result.xml
Or read from stdin:
cat input.xml | xee xslt stylesheet.xsl
This is built using xee-xpath
,
a high level API to issue XPath 3.1 expressions in Rust.
This project was made possible by the generous support of Paligo.