Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I serialize Python objects to XML?

I need to serialize my Python objects into XML data. I tried to use Django, but it only works for QuerySet objects and not for any simple Python object.

How can I serialize a Python object into XML data?

like image 810
Wasim Avatar asked Jan 20 '10 14:01

Wasim


2 Answers

http://freshmeat.net/projects/gnosisxml/

like image 108
darelf Avatar answered Oct 12 '22 03:10

darelf


You could also have a look at the objectify module from lxml.

like image 3
jkp Avatar answered Oct 12 '22 03:10

jkp