Skip to main content

Like jq but for XML and XPath.

Project description

Apply XPath expressions to XML, like jq does for JSONPath and JSON.

Usage

Extract download URLs from an RSS feed:

http get 'http://br-rss.jeffbr13.net/rss/channels/1/' | xq '//item/enclosure/@url'

Extract all links from an HTML page footer:

http get 'http://br-rss.jeffbr13.net/ | xq '//footer//a/@href'

Build

Increment xq.VERSION and run the following two commands to create a source distribution, create a universal wheel, and upload to PyPI

python setup.py sdist
python setup.py bdist_wheel --universal
twine upload dist/*

See Also

  • jq <https://github.com/stedolan/jq>

  • hq <https://github.com/rbwinslow/hq>

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xq-0.0.3.tar.gz (3.9 kB view hashes)

Uploaded Source

Built Distributions

xq-0.0.3-py3.6.egg (9.8 kB view hashes)

Uploaded Source

xq-0.0.3-py2.py3-none-any.whl (6.5 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page