This release is a pre-release and may not be stable for production use.
README: A Python interface to xmlsq
The utility xmlsq performs simple and full XPath 1.0 queries on an XML document.
>>> import xmlsq >>> xml = r"<a><b foo='baz'>hello</b><b>world</b><e /></a>" >>> xmlsq.get_text(xml, "//b") 'hello' >>> xmlsq.get_text(xml, "//b[2]") 'world' >>> xmlsq.full_query(xml, "//b") '<b foo="baz">hello</b>\n<b>world</b>\n' >>> xmlsq.get_text(xml, "//b/@foo") 'baz' >>> xmlsq.full_query(xml, "//b/@foo") 'foo="baz"\n' >>> xmlsq.full_query(xml, "/a", xmlsq.Opts.RAW) '<a><b foo="baz">hello</b><b>world</b><e/></a>' >>> xmlsq.count(xml, "//b") 2 >>> xmlsq.count(xml, "//notthere") 0 >>> xmlsq.count(xml, "//e") 1 >>> xmlsq.full_query(xml, "2+3.5") '5.500000'
xmlsq.get_text() extracts the text value of the first node found selected by the query.
xmlsq.full_query() outputs the result of the full XPath 1.0 query as a string.
xmlsq.count() computes the integer value of count(query).
For xmlsq.get_text() and xmlsq.count() the query must evaluate to a node. xmlsq.full_query() accepts any valid XPath 1.0 expression and returns the result as a string.
For full details of all available methods and options, please see the documentation.
System requirements
Windows platform with Python 3. Requires the Windows native library diXmlsq.dll to be installed on your system, available from https://www.cryptosys.net/xmlsq/.
Acknowledgment
This software is based on the pugixml library (https://pugixml.org). Pugixml is Copyright (C) 2006-2019 Arseny Kapoulkine.
Contact
For more information or to make suggestions, please contact us at https://cryptosys.net/contact/
Metadata
Release files for xmlsq 0.9.0a1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| xmlsq-0.9.0a1.zip | 8.8 kB | Without provenance | Details for xmlsq-0.9.0a1.zip |
Release files / xmlsq-0.9.0a1.zip
| Download URL | xmlsq-0.9.0a1.zip |
|---|---|
| Size | 8.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
01d5a88cb5a9296325e6891a8a2fb11a1f89aafca39386f5aaa5e3b1c34dddeb
|
|
BLAKE2b-256 checksum How to use checksums |
a60bd07001c6a421283142067825090a5ac65e1e579f2208b7c87135ad2b9190
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.9.1 pkginfo/1.4.1 requests/2.18.3 setuptools/36.2.7 requests-toolbelt/0.8.0 tqdm/4.15.0 CPython/2.7.12
|
Security for xmlsq 0.9.0a1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.