Reputation: 4991
I'm learning Python, my background is Java EE. I have used JAXB before, where I can basically define a regular class, throw some annotations in there and then use JAXB to marshall objects to xml. This means I am not concerned with creating root elements, nodes, etc. but merely writing the Java class and anotating it here and there. Is there anything like this for Python?
Upvotes: 7
Views: 7774
Reputation: 27724
PyXB seems to be the closest thing to JAXB although I haven't used it yet. I use lxml at the moment and find it works well. Amara was promising but seemed to stagnate.
Upvotes: 3
Reputation: 10526
Here are a few:
pyxser seems pretty cool
Pickle to XML - uses Python's pickle and xml.dom.minidom
pyxml -from xml import marshal
(might be buggy)
Amara might be worth looking into.
Upvotes: 7