XML Binding

Michele Simionato michele.simionato at gmail.com
Fri Sep 11 08:47:47 CEST 2015

On Thursday, September 3, 2015 at 6:55:06 PM UTC+2, Palpandi wrote:
> Hi All,
> Is there any module available in python standard library for XML binding? If not, any other suggestions.
> Which is good for parsing large file?
> 1. XML binding
> 2. Creating our own classes
> Thanks,
> Palpandi

I am one who has just abandoned lxml for xml.etree in the standard library. The reasons for that change were:

1. we had issues compiling/installing lxml on different platforms
2. we had instabilities from one version to the other for what we wanted to do (XML validation with an XSD schema)

At the end we solved everything by replacing the XSD validation with a custom validation (which we had to do anyway); at that point the need for lxml disappeared and ElementTree did everything we wanted, except providing the line error in case of invalid files, which was easy to add. It was also smaller, easier to understand and to customize. Its speed was more than enough.

However I hear that everybody else is happy with lxml, so YMMV.


More information about the Python-list mailing list