streamingxmlwriter
A lightweight pythonic standard compliant streaming xml writer.
from io import BytesIO import streamingxmlwriter stream = BytesIO() with streamingxmlwriter.from_stream(stream) as writer: writer.start_namespace('myns', 'http://mynamespace.org/') with writer.element('myns:root', {'att1': '1'}): with writer.element('myns:child1'): writer.characters('text content') writer.comment(' a comment ') with writer.element('myns:child2'): writer.characters('text content') # shortcut for elements containing a single text node writer.text_element('myns:child3', 'text content', {'att2': '2'})
For more API examples, look at the documentation of the StreamingXMLWriter class in core.py.
Under the hood it generates SAX events to the standard xml.sax.saxutils.XMLGenerator. It also provides a from_sax_handler constructor so it can also be used to emit sax events for other purposes than outputing to an io stream.
Python 2 (2.7+) and python 3 (3.3+) are supported.
Supported XML features are:
elements
attributes
text
processing instructions
comments
selectable encoding
namespaces for elements and attributes, with or without prefix
Unsupported XML features (yet):
DOCTYPE declaration
entities
CDATA sections
Credits
Maintainer
This module is maintained by ACSONE SA/NV.
Metadata
Release files for streamingxmlwriter 1.0.0
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 |
|---|---|---|---|---|
| streamingxmlwriter-1.0.0.tar.gz | 7.1 kB | Without provenance | Details for streamingxmlwriter-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| streamingxmlwriter-1.0.0-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for streamingxmlwriter-1.0.0-py2.py3-none-any.whl |
Total release size: 11.9 kB
Release files / streamingxmlwriter-1.0.0.tar.gz
| Download URL | streamingxmlwriter-1.0.0.tar.gz |
|---|---|
| Size | 7.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3d68345d35628a60776c359e467d883aa264b7fb0eb772cfccd49fe1ab3897ae
|
|
BLAKE2b-256 checksum How to use checksums |
844d05838decadb43601835243e4d88aeeb62cb030949d9b1af0c277c4a8590d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / streamingxmlwriter-1.0.0-py2.py3-none-any.whl
| Download URL | streamingxmlwriter-1.0.0-py2.py3-none-any.whl |
|---|---|
| Size | 4.8 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
7cd7576f2eb9c8f1510b7cda6f0d4519da50c0f816d788e205fa8d9939247827
|
|
BLAKE2b-256 checksum How to use checksums |
6c7a09ae2cef23249fa6eb7b7c3a64974d1c824ffce22eab6d549083503f9437
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for streamingxmlwriter 1.0.0
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.