Skip to main content

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


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

speedyxml-0.4.0.16.tar.gz (12.5 kB view details)

Uploaded Source

File details

Details for the file speedyxml-0.4.0.16.tar.gz.

File metadata

  • Download URL: speedyxml-0.4.0.16.tar.gz
  • Upload date:
  • Size: 12.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for speedyxml-0.4.0.16.tar.gz
Algorithm Hash digest
SHA256 b17d2748c35bea1a88a793832b55778457305bac424d04f7228e0e7fbce2de14
MD5 dbfa3c4f249d7569aa97340714d0d316
BLAKE2b-256 605ab35ac422877b26718377693823cd2c80b5f42fea0b48f1789b072cfa87bb

See more details on using hashes here.

Supported by

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