Skip to main content
Help improve PyPI by participating in a 5-minute user interface survey!

Speedy XML parser for Python

Project Description

Usage is fairly straightforward:

import speedyxml
xml = speedyxml.parse('<xml><test this="now" /></xml>')

Will result in:

(
u'xml',
None,
[
(
u'test',
{u'this': u'now'},
None
)
]
)

So basically its:

(nodeName, attributes, children)

Plus some options (second argument to parse)

FLAG_EXPANDEMPTY

If you want empty attributes and children to be {} and [] instead of None, use this

FLAG_RETURNCOMMENTS

Return comments as:

(TAG_COMMENT, None, u' comment ')

FLAG_RETURNPI

Returns processing instructions as:

(TAG_PI, {u'name': u'php'}, u'phpinfo();')

FLAG_IGNOREENTITIES

does not resolve entities when set

And one exception:

XMLParseException


Release history Release notifications

History Node

0.3.9.1

This version
History Node

0.3.8

History Node

0.3.7

History Node

0.3.6

History Node

0.3.5

History Node

0.3.4

History Node

0.3.3

History Node

0.3.2

History Node

0.3.1

History Node

0.3

History Node

0.2

History Node

0.1

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
speedyxml-0.3.8.tar.gz (11.3 kB) Copy SHA256 hash SHA256 Source None Sep 18, 2012

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page