Skip to main content
PyPI version Wheel Python versions License Documentation Black code style Typing checked by mypy Ruff linting Imports sorted by isort Code checks

Xul scripts

Xul is a set of XML scripts written in Python.

  • ppx: pretty print XML

  • xp: select XML nodes with XPath

  • transform: transform XML with XSLT

  • validate: validate XML with XSD, DTD or RELAX NG

Installation

Xul command line scripts can be installed with pip:

$ pip install Xul

Install Pygments for XML syntax highlighting (optional).

$ pip install Xul[syntax]

Dependencies

Xul uses the excellent lxml XML toolkit, a Pythonic binding for the C libraries libxml2 and libxslt.

Documentation

Xul documentation can be found on Read The Docs.

Options

List the command-line options of a Xul script with --help. For example:

$ xp --help

usage: xp [-h] [-V] [-l | -L] [-d DEFAULT_NS_PREFIX] [-e] [-q] [-c] [-p] [-r] [-m] xpath_expr [xml_source ...]

Select nodes in an XML source with an XPath expression.

positional arguments:
  xpath_expr            XPath expression
  xml_source            XML source (file, <stdin>, http://...)

options:
  -h, --help            show this help message and exit
  -V, --version         show program's version number and exit
  -m, --method          use ElementTree.xpath method instead of XPath class

file hit options:
  output filenames to standard output

  -l, -f, --files-with-hits
                        only names of files with a result that is not false and not NaN
                        are written to standard output
  -L, -F, --files-without-hits
                        only names of files with a false or NaN result, or without a result,
                        are written to standard output

namespace options:
  -d DEFAULT_NS_PREFIX, --default-prefix DEFAULT_NS_PREFIX
                        set the prefix for the default namespace in XPath [default: 'd']
  -e, --exslt           add EXSLT XML namespaces
  -q, --quiet           don't print XML source namespaces

output options:
  -c, --count           only a count of the result nodes is printed
  -p, --pretty-element  pretty print the result element
  -r, --result-xpath    also print the XPath expression of the result element (or its parent)

W3C standards

Metadata

Release files for Xul 3.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Xul 3.1.2
File Size Uploaded
xul-3.1.2.tar.gz 93.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for Xul 3.1.2
File Interpreter ABI Platform
xul-3.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 114.0 kB

Release files / xul-3.1.2.tar.gz

Download URL xul-3.1.2.tar.gz
Size 93.5 kB
Tags Source
SHA-256 checksum
How to use checksums
0ddbb43c35ef977b5f5e6de8135822f71dc1bc4e88fdf7db72bea2936b507661
BLAKE2b-256 checksum
How to use checksums
836f668ed9b7b81ff901201b8b96f848d9fbc35ca8be386c6d7942ef997eb192
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 25, 2025.

Transparency log

Release files / xul-3.1.2-py3-none-any.whl

Download URL xul-3.1.2-py3-none-any.whl
Size 20.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
13db227cd1fcb91d6560809b6bfb864bd6c16b596cd4cebda8a27c7182af9ee5
BLAKE2b-256 checksum
How to use checksums
e87900de323db49740e7bdb2127fa884b71dc299b13b2822ddcdddf77ca2e4df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 25, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

3.1.2 This release

2 release files

3.1.1

2 release files

3.1.0

2 release files

3.0.0

2 release files

2.5.1

3 release files

2.5.0

3 release files

2.4.2

4 release files

2.4.1

2 release files

2.4.0

2 release files

2.3.0

2 release files

2.2.1

2 release files

2.2.0

2 release files

2.1.0

2 release files

2.0.3

2 release files

2.0.2

2 release files

2.0.1

3 release files

2.0.0

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page