Skip to main content

Python RapidXml Library

Project description

A library providing python bindings for rapidxml


import rapidxml

r = rapidxml.RapidXml(b"<test/><test2>foo</test2><test></test>") # parsing from bytes
test = r.first_node("test") # get first node named test = "foo" # changing node's name to foo
r.first_node("test2").value = "bar" # changing node's value to bar

print(str(r)) # will output a prettified string of the xml document
print(r.unparse(pretty=False, raw=True)) # will output the xml document as flat bytes
print(test) # also works for nodes

with open('dump.xml', 'w') as f:
r = rapidxml.RapidXml("dump.xml", from_file=True) # loading from file

assert(str(r) == r.unparse(pretty=True, raw=False)) # is always True
assert(repr(r) == r.unparse(pretty=False, raw=False)) # also always True


Latest Version Supported Python Versions

If you have downloaded the source code:

python install

or if you want to obtain a copy from the Pypi repository:

pip install rapidxml

Both commands will install the required package dependencies.

A distribution package can be obtained for manual installation at:


python_rapidxml’s git repo is available on GitHub, which can be browsed at github and cloned like that:

git clone


MIT license. See the LICENSE file.

Development status

Build Status

This project is currently under development.

Project details

Download files

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

Files for RapidXml, version 2.1.1
Filename, size & hash File type Python version Upload date
RapidXml-2.1.1.tar.gz (33.5 kB) View hashes Source None

Supported by

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