This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description


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', '')
    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

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



  • Stéphane Bidoul (ACSONE)


This module is maintained by ACSONE SA/NV.

Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
streamingxmlwriter-1.0.0-py2.py3-none-any.whl (4.8 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Feb 17, 2016
streamingxmlwriter-1.0.0.tar.gz (7.1 kB) Copy SHA256 Checksum SHA256 Source Feb 17, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting