Skip to content

marcelnicolay/simplexml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SimpleXML - encoder/decoder

Travis CI

SimpleXML is a simple and fast XML encoder/decoder for Python.

Basic usage

dictionary to XML

import simplexml
person = {'person':{'name':'joaquim','age':15,'cars':[{'id':1},{'id':2}]}}
simplexml.dumps(person)
'<?xml version="1.0" ?><person><cars><car><id>1</id></car><car><id>2</id></car></cars><age>15</age><name>joaquim></name></person>'

XML to dictionary

import simplexml
person = simplexml.loads('<?xml version="1.0" ?><person><cars><car><id>1</id></car><car><id>2</id></car></cars><age>15</age><name>joaquim</name></person>')
person['person']['name']
u'joaquim'

Installing

$pip install python-simplexml

Contributing

Fell free to contribute and send me a pull request.

About

Simple and fast XML encoder/decoder for Python

Resources

License

Stars

Watchers

Forks

Packages

No packages published