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_RETURNPOSITIONS

return position of tags in fourth entry in tuple

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.1.0.tar.gz (12.7 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: speedyxml-0.4.1.0.tar.gz
  • Upload date:
  • Size: 12.7 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.1.0.tar.gz
Algorithm Hash digest
SHA256 dd8c568d150a0282296e4c9063fcb88182763a29a840e2b56bda4df5249624be
MD5 f4f35c6e76f6abd7dad3fb8bd13dfe60
BLAKE2b-256 c260ca133a005c35d3bd74b29667d51f5ed35fa2301eac6557bced1c2b1dd3ea

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