Skip to content

Commit 4f2f327

Browse files
author
Arzaroth Lekva
committed
bump version & update readme
1 parent cc20004 commit 4f2f327

2 files changed

Lines changed: 24 additions & 23 deletions

File tree

README.md

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,39 @@ A library providing python bindings for rapidxml
44

55
### Example
66

7-
import rapidxml
7+
```python
8+
import rapidxml
89

9-
r = rapidxml.RapidXml(b"<test/><test2>foo</test2><test></test>") # parsing from bytes
10-
test = r.first_node("test") # get first node named test
11-
test.name = "foo" # changing node's name to foo
12-
r.first_node("test2").value = "bar" # changing node's value to bar
10+
r = rapidxml.RapidXml(b"<test/><test2>foo</test2><test></test>") # parsing from bytes
11+
test = r.first_node("test") # get first node named test
12+
test.name = "foo" # changing node's name to foo
13+
r.first_node("test2").value = "bar" # changing node's value to bar
1314

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

18-
with open('dump.xml', 'w') as f:
19-
f.write(str(r))
20-
r = rapidxml.RapidXml("dump.xml", True) # loading from file
21-
22-
assert(str(r) == r.unparse(True, False)) # is always True
23-
assert(repr(r) == r.unparse(pretty=False, raw=False)) # also always True
19+
with open('dump.xml', 'w') as f:
20+
f.write(str(r))
21+
r = rapidxml.RapidXml("dump.xml", from_file=True) # loading from file
2422

23+
assert(str(r) == r.unparse(True, False)) # is always True
24+
assert(repr(r) == r.unparse(pretty=False, raw=False)) # also always True
25+
```
2526

2627
### Install
2728

28-
[![Latest Version](https://pypip.in/version/RapidXml/badge.svg)](https://pypi.python.org/pypi/RapidXml/)
29-
[![Supported Python Versions](https://pypip.in/py_versions/RapidXml/badge.svg)](https://pypi.python.org/pypi/RapidXml/)
29+
[![Latest Version](https://img.shields.io/pypi/v/RapidXml.svg)](https://pypi.python.org/pypi/RapidXml/)
30+
[![Supported Python Versions](https://img.shields.io/pypi/pyversions/RapidXml.svg)](https://pypi.python.org/pypi/RapidXml/)
3031

3132
If you have downloaded the source code:
32-
33+
```sh
3334
python setup.py install
34-
35+
```
3536
or if you want to obtain a copy from the Pypi repository:
36-
37+
```sh
3738
pip install rapidxml
38-
39+
```
3940
Both commands will install the required package dependencies.
4041

4142
A distribution package can be obtained for manual installation at:
@@ -46,9 +47,9 @@ A distribution package can be obtained for manual installation at:
4647
### Source
4748

4849
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:
49-
50+
```sh
5051
git clone https://github.com/Arzaroth/python_rapidxml.git
51-
52+
```
5253

5354
### License
5455

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
from setuptools import setup, Extension, find_packages
1010

11-
VERSION = ("2", "0", "0")
11+
VERSION = ("2", "1", "0")
1212

1313
rapidxml = Extension("rapidxml.c_ext",
1414
define_macros=[('MAJOR_VERSION', VERSION[0]),

0 commit comments

Comments
 (0)