Xul


NameXul JSON
Version 3.1.2 PyPI version JSON
download
home_pageNone
SummaryXML (XPath, XSD, XSLT) Utilities
upload_time2025-10-25 12:15:52
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseNone
keywords dtd relax ng rng xml xml schema xpath xsd xslt
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ====================
Xul -- XML Utilities
====================

.. image:: https://img.shields.io/pypi/v/xul
   :target: https://pypi.org/project/Xul/
   :alt: PyPI version

.. image:: https://img.shields.io/pypi/wheel/xul.svg
   :target: https://pypi.org/project/Xul/
   :alt: Wheel

.. image:: https://img.shields.io/pypi/pyversions/xul.svg
   :target: https://pypi.org/project/Xul/
   :alt: Python versions

.. image:: https://img.shields.io/pypi/l/xul.svg
   :target: https://pypi.org/project/Xul/
   :alt: License

.. image:: https://readthedocs.org/projects/xul/badge/
   :target: https://xul.readthedocs.io/en/stable/
   :alt: Documentation

.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
   :target: https://github.com/psf/black
   :alt: Black code style

.. image:: https://img.shields.io/badge/type%20checked-mypy-039dfc
   :target: https://mypy-lang.org
   :alt: Typing checked by mypy

.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json
   :target: https://astral.sh/ruff
   :alt: Ruff linting

.. image:: https://img.shields.io/badge/imports-isort-1674b1
   :target: https://pycqa.github.io/isort/
   :alt: Imports sorted by isort

.. image:: https://github.com/peteradrichem/Xul/actions/workflows/code-checks.yml/badge.svg
   :target: https://github.com/peteradrichem/Xul/actions/workflows/code-checks.yml
   :alt: 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:

.. code:: text

        $ pip install Xul

Install Pygments_ for XML syntax highlighting (optional).

.. code:: text

        $ 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:

.. code-block:: console

   $ 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
-------------
- `Extensible Markup Language (XML) 1.0 <https://www.w3.org/TR/xml/>`_
- `XML Schema 1.1 <https://www.w3.org/XML/Schema>`_
- `XSL Transformations (XSLT) 1.0 <https://www.w3.org/TR/xslt-10/>`_
- `XML Path Language (XPath) 1.0 <https://www.w3.org/TR/xpath-10/>`_
- `Namespaces in XML 1.0 <https://www.w3.org/TR/xml-names/>`_

Related
-------
- `Extensions to XSLT (EXSLT) <https://exslt.github.io/>`_
- `RELAX NG <https://relaxng.org/>`_


.. _Read The Docs: https://xul.readthedocs.io/
.. _lxml: https://lxml.de/
.. _libxml2: https://gitlab.gnome.org/GNOME/libxml2/-/wikis/
.. _libxslt: https://gitlab.gnome.org/GNOME/libxslt/-/wikis/
.. _Pygments: https://pygments.org/

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "Xul",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "dtd, relax ng, rng, xml, xml schema, xpath, xsd, xslt",
    "author": null,
    "author_email": "Peter Adrichem <Peter.Adrichem@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/83/6f/668ed9b7b81ff901201b8b96f848d9fbc35ca8be386c6d7942ef997eb192/xul-3.1.2.tar.gz",
    "platform": null,
    "description": "====================\nXul -- XML Utilities\n====================\n\n.. image:: https://img.shields.io/pypi/v/xul\n   :target: https://pypi.org/project/Xul/\n   :alt: PyPI version\n\n.. image:: https://img.shields.io/pypi/wheel/xul.svg\n   :target: https://pypi.org/project/Xul/\n   :alt: Wheel\n\n.. image:: https://img.shields.io/pypi/pyversions/xul.svg\n   :target: https://pypi.org/project/Xul/\n   :alt: Python versions\n\n.. image:: https://img.shields.io/pypi/l/xul.svg\n   :target: https://pypi.org/project/Xul/\n   :alt: License\n\n.. image:: https://readthedocs.org/projects/xul/badge/\n   :target: https://xul.readthedocs.io/en/stable/\n   :alt: Documentation\n\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg\n   :target: https://github.com/psf/black\n   :alt: Black code style\n\n.. image:: https://img.shields.io/badge/type%20checked-mypy-039dfc\n   :target: https://mypy-lang.org\n   :alt: Typing checked by mypy\n\n.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json\n   :target: https://astral.sh/ruff\n   :alt: Ruff linting\n\n.. image:: https://img.shields.io/badge/imports-isort-1674b1\n   :target: https://pycqa.github.io/isort/\n   :alt: Imports sorted by isort\n\n.. image:: https://github.com/peteradrichem/Xul/actions/workflows/code-checks.yml/badge.svg\n   :target: https://github.com/peteradrichem/Xul/actions/workflows/code-checks.yml\n   :alt: Code checks\n\n\nXul scripts\n===========\nXul is a set of XML scripts written in Python.\n\n- ``ppx``: pretty print XML\n- ``xp``: select XML nodes with XPath\n- ``transform``: transform XML with XSLT\n- ``validate``: validate XML with XSD, DTD or RELAX NG\n\nInstallation\n------------\nXul command line scripts can be installed with pip:\n\n.. code:: text\n\n        $ pip install Xul\n\nInstall Pygments_ for XML syntax highlighting (optional).\n\n.. code:: text\n\n        $ pip install Xul[syntax]\n\nDependencies\n------------\nXul uses the excellent lxml_ XML toolkit, a Pythonic binding for the C libraries\nlibxml2_ and libxslt_.\n\nDocumentation\n=============\nXul documentation can be found on `Read The Docs`_.\n\nOptions\n-------\nList the command-line options of a Xul script with ``--help``.\nFor example:\n\n.. code-block:: console\n\n   $ xp --help\n\n   usage: xp [-h] [-V] [-l | -L] [-d DEFAULT_NS_PREFIX] [-e] [-q] [-c] [-p] [-r] [-m] xpath_expr [xml_source ...]\n\n   Select nodes in an XML source with an XPath expression.\n\n   positional arguments:\n     xpath_expr            XPath expression\n     xml_source            XML source (file, <stdin>, http://...)\n\n   options:\n     -h, --help            show this help message and exit\n     -V, --version         show program's version number and exit\n     -m, --method          use ElementTree.xpath method instead of XPath class\n\n   file hit options:\n     output filenames to standard output\n\n     -l, -f, --files-with-hits\n                           only names of files with a result that is not false and not NaN\n                           are written to standard output\n     -L, -F, --files-without-hits\n                           only names of files with a false or NaN result, or without a result,\n                           are written to standard output\n\n   namespace options:\n     -d DEFAULT_NS_PREFIX, --default-prefix DEFAULT_NS_PREFIX\n                           set the prefix for the default namespace in XPath [default: 'd']\n     -e, --exslt           add EXSLT XML namespaces\n     -q, --quiet           don't print XML source namespaces\n\n   output options:\n     -c, --count           only a count of the result nodes is printed\n     -p, --pretty-element  pretty print the result element\n     -r, --result-xpath    also print the XPath expression of the result element (or its parent)\n\n\nW3C standards\n-------------\n- `Extensible Markup Language (XML) 1.0 <https://www.w3.org/TR/xml/>`_\n- `XML Schema 1.1 <https://www.w3.org/XML/Schema>`_\n- `XSL Transformations (XSLT) 1.0 <https://www.w3.org/TR/xslt-10/>`_\n- `XML Path Language (XPath) 1.0 <https://www.w3.org/TR/xpath-10/>`_\n- `Namespaces in XML 1.0 <https://www.w3.org/TR/xml-names/>`_\n\nRelated\n-------\n- `Extensions to XSLT (EXSLT) <https://exslt.github.io/>`_\n- `RELAX NG <https://relaxng.org/>`_\n\n\n.. _Read The Docs: https://xul.readthedocs.io/\n.. _lxml: https://lxml.de/\n.. _libxml2: https://gitlab.gnome.org/GNOME/libxml2/-/wikis/\n.. _libxslt: https://gitlab.gnome.org/GNOME/libxslt/-/wikis/\n.. _Pygments: https://pygments.org/\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "XML (XPath, XSD, XSLT) Utilities",
    "version": "3.1.2",
    "project_urls": {
        "Changelog": "https://xul.readthedocs.io/en/latest/changelog.html",
        "Documentation": "https://xul.readthedocs.io/en/stable/",
        "Homepage": "https://xul.readthedocs.io/",
        "Source": "https://github.com/peteradrichem/Xul"
    },
    "split_keywords": [
        "dtd",
        " relax ng",
        " rng",
        " xml",
        " xml schema",
        " xpath",
        " xsd",
        " xslt"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "e87900de323db49740e7bdb2127fa884b71dc299b13b2822ddcdddf77ca2e4df",
                "md5": "b06f897df273f9787880c239291753a1",
                "sha256": "13db227cd1fcb91d6560809b6bfb864bd6c16b596cd4cebda8a27c7182af9ee5"
            },
            "downloads": -1,
            "filename": "xul-3.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b06f897df273f9787880c239291753a1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 20449,
            "upload_time": "2025-10-25T12:15:50",
            "upload_time_iso_8601": "2025-10-25T12:15:50.502391Z",
            "url": "https://files.pythonhosted.org/packages/e8/79/00de323db49740e7bdb2127fa884b71dc299b13b2822ddcdddf77ca2e4df/xul-3.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "836f668ed9b7b81ff901201b8b96f848d9fbc35ca8be386c6d7942ef997eb192",
                "md5": "297a0b1dcbd3ffb7f0a61bff2de11386",
                "sha256": "0ddbb43c35ef977b5f5e6de8135822f71dc1bc4e88fdf7db72bea2936b507661"
            },
            "downloads": -1,
            "filename": "xul-3.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "297a0b1dcbd3ffb7f0a61bff2de11386",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 93537,
            "upload_time": "2025-10-25T12:15:52",
            "upload_time_iso_8601": "2025-10-25T12:15:52.332215Z",
            "url": "https://files.pythonhosted.org/packages/83/6f/668ed9b7b81ff901201b8b96f848d9fbc35ca8be386c6d7942ef997eb192/xul-3.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-25 12:15:52",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "peteradrichem",
    "github_project": "Xul",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "xul"
}
        
Elapsed time: 1.29973s