## python_rapidxml
A library providing python bindings for rapidxml
### Example
```python
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
test.name = "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:
f.write(str(r))
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
```
### Install
[](https://pypi.python.org/pypi/RapidXml/)
[](https://pypi.python.org/pypi/RapidXml/)
If you have downloaded the source code:
```sh
python setup.py install
```
or if you want to obtain a copy from the Pypi repository:
```sh
pip install rapidxml
```
Both commands will install the required package dependencies.
A distribution package can be obtained for manual installation at:
http://pypi.python.org/pypi/RapidXml
### Source
python_rapidxml's git repo is available on GitHub, which can be browsed at [github](https://github.com/Arzaroth/python_rapidxml) and cloned like that:
```sh
git clone https://github.com/Arzaroth/python_rapidxml.git
```
### License
MIT license. See the LICENSE file.
Raw data
{
"_id": null,
"home_page": "https://github.com/Arzaroth/python_rapidxml",
"name": "RapidXml",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "rapidxml xml parsing",
"author": "Marc-Etienne Barrut",
"author_email": "lekva@arzaroth.com",
"download_url": "https://files.pythonhosted.org/packages/ed/54/393df9c19e171b83a42f8981d43e67cb5f308ea21ba91af835b0e7b12340/rapidxml-2.1.2.tar.gz",
"platform": null,
"description": "## python_rapidxml\n\nA library providing python bindings for rapidxml\n\n### Example\n\n```python\nimport rapidxml\n\nr = rapidxml.RapidXml(b\"<test/><test2>foo</test2><test></test>\") # parsing from bytes\ntest = r.first_node(\"test\") # get first node named test\ntest.name = \"foo\" # changing node's name to foo\nr.first_node(\"test2\").value = \"bar\" # changing node's value to bar\n\nprint(str(r)) # will output a prettified string of the xml document\nprint(r.unparse(pretty=False, raw=True)) # will output the xml document as flat bytes\nprint(test) # also works for nodes\n\nwith open('dump.xml', 'w') as f:\n f.write(str(r))\nr = rapidxml.RapidXml(\"dump.xml\", from_file=True) # loading from file\n\nassert(str(r) == r.unparse(pretty=True, raw=False)) # is always True\nassert(repr(r) == r.unparse(pretty=False, raw=False)) # also always True\n```\n\n### Install\n\n[](https://pypi.python.org/pypi/RapidXml/)\n[](https://pypi.python.org/pypi/RapidXml/)\n\nIf you have downloaded the source code:\n```sh\npython setup.py install\n```\nor if you want to obtain a copy from the Pypi repository:\n```sh\npip install rapidxml\n```\nBoth commands will install the required package dependencies.\n\nA distribution package can be obtained for manual installation at:\n\n http://pypi.python.org/pypi/RapidXml\n\n\n### Source\n\npython_rapidxml's git repo is available on GitHub, which can be browsed at [github](https://github.com/Arzaroth/python_rapidxml) and cloned like that:\n```sh\ngit clone https://github.com/Arzaroth/python_rapidxml.git\n```\n\n### License\n\nMIT license. See the LICENSE file.\n\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Python RapidXml Library",
"version": "2.1.2",
"project_urls": {
"Download": "https://github.com/Arzaroth/python_rapidxml/tarball/2.1.2",
"Homepage": "https://github.com/Arzaroth/python_rapidxml"
},
"split_keywords": [
"rapidxml",
"xml",
"parsing"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "ed54393df9c19e171b83a42f8981d43e67cb5f308ea21ba91af835b0e7b12340",
"md5": "1ec750a7cd2325830d95ae1cb54bbefe",
"sha256": "aeadea0edc0c44323a28672dbc6315d3a723b5680ed542c8d584bb1e90dcb596"
},
"downloads": -1,
"filename": "rapidxml-2.1.2.tar.gz",
"has_sig": false,
"md5_digest": "1ec750a7cd2325830d95ae1cb54bbefe",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 34119,
"upload_time": "2025-11-05T23:36:14",
"upload_time_iso_8601": "2025-11-05T23:36:14.993537Z",
"url": "https://files.pythonhosted.org/packages/ed/54/393df9c19e171b83a42f8981d43e67cb5f308ea21ba91af835b0e7b12340/rapidxml-2.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-11-05 23:36:14",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Arzaroth",
"github_project": "python_rapidxml",
"travis_ci": true,
"coveralls": false,
"github_actions": false,
"lcname": "rapidxml"
}