XML (XPath, XSD, XSLT) Utilities
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xul-3.1.2.tar.gz.
File metadata
- Download URL: xul-3.1.2.tar.gz
- Upload date:
- Size: 93.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ddbb43c35ef977b5f5e6de8135822f71dc1bc4e88fdf7db72bea2936b507661
|
|
| MD5 |
297a0b1dcbd3ffb7f0a61bff2de11386
|
|
| BLAKE2b-256 |
836f668ed9b7b81ff901201b8b96f848d9fbc35ca8be386c6d7942ef997eb192
|
Provenance
The following attestation bundles were made for xul-3.1.2.tar.gz:
Publisher:
publish-to-pypi.yml on peteradrichem/Xul
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xul-3.1.2.tar.gz -
Subject digest:
0ddbb43c35ef977b5f5e6de8135822f71dc1bc4e88fdf7db72bea2936b507661 - Sigstore transparency entry: 640273059
- Sigstore integration time:
-
Permalink:
peteradrichem/Xul@191c04f7fdfb593b73d948dd4be71af499e8a6e1 -
Branch / Tag:
refs/tags/3.1.2 - Owner: https://github.com/peteradrichem
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@191c04f7fdfb593b73d948dd4be71af499e8a6e1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file xul-3.1.2-py3-none-any.whl.
File metadata
- Download URL: xul-3.1.2-py3-none-any.whl
- Upload date:
- Size: 20.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
13db227cd1fcb91d6560809b6bfb864bd6c16b596cd4cebda8a27c7182af9ee5
|
|
| MD5 |
b06f897df273f9787880c239291753a1
|
|
| BLAKE2b-256 |
e87900de323db49740e7bdb2127fa884b71dc299b13b2822ddcdddf77ca2e4df
|
Provenance
The following attestation bundles were made for xul-3.1.2-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on peteradrichem/Xul
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xul-3.1.2-py3-none-any.whl -
Subject digest:
13db227cd1fcb91d6560809b6bfb864bd6c16b596cd4cebda8a27c7182af9ee5 - Sigstore transparency entry: 640273060
- Sigstore integration time:
-
Permalink:
peteradrichem/Xul@191c04f7fdfb593b73d948dd4be71af499e8a6e1 -
Branch / Tag:
refs/tags/3.1.2 - Owner: https://github.com/peteradrichem
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@191c04f7fdfb593b73d948dd4be71af499e8a6e1 -
Trigger Event:
push
-
Statement type: