I need a recommendation for a pythonic library that can marshall python objects to XML(let it be a file).
I need to be able read that XML later on with Java (JAXB) and unmarshall it.
I know JAXB has some issues that makes it not play nice with .NET XML libraries so a recommendation on something that actually works would be great.
I need a recommendation for a pythonic library that can marshall python objects to
Share
As Ignacio says, XML is XML. On the python side, I recommend using
lxml, unless you have more specific needs that are better met by another library. If you are restricted to the standard library, look atElementTreeorcElementTree, which are also excellent, and which inspired (and are functionally mostly equivalent to)lxml.etree.Edit: On closer look, it seems you are not just looking for XML, but for XML representations of objects. For this, check out
lxml.objectify, or Amara. I haven’t tried using them for interoperability with Java, but they’re worth a try. If you’re just looking for a way to do data exchange, you might also try custom JSON objects.