Xul is a set of XML scripts written in Python. Documentation can be found on Read The Docs.
ppx
: pretty print XMLxp
: select XML nodes with XPathtransform
: transform XML with XSLTvalidate
: validate XML with XSD, DTD or RELAX NG
Xul command line scripts can be installed with pip:
$ pip install Xul
Install Pygments for XML syntax highlighting (optional).
$ pip install Xul[syntax]
Xul uses the excellent lxml XML toolkit, a Pythonic binding for the C libraries libxml2 and libxslt.
List the command-line options of a Xul script with --help
.
For example:
$ ppx --help usage: ppx [-h] [-V] [-n] [-o] [xml_source [xml_source ...]] Pretty Print XML source in human readable form. positional arguments: xml_source XML source (file, <stdin>, http://...) optional arguments: -h, --help show this help message and exit -V, --version show program's version number and exit -n, --no-syntax no syntax highlighting -o, --omit-declaration omit the XML declaration
Xul documentation can be found on Read The Docs.
- Extensible Markup Language (XML) 1.0
- XML Schema 1.1
- XSL Transformations (XSLT) 1.0
- XML Path Language (XPath) 1.0
- Namespaces in XML 1.0