XML Binding

Stefan Behnel stefan_ml at behnel.de
Wed Sep 9 11:44:07 CEST 2015


dieter schrieb am 09.09.2015 um 10:20:
> Palpandi writes:
>> Is it better to use pyxb than lxml?
>>
>> What are the advantages of lxml and pyxb?
> 
> "pyxb" has a different aim than "lxml".
> 
> "lxml" is a general purpose library to process XML documents.
> It gives you an interface to the document's resources (elements,
> attributes, comments, processing instructions) on a low level
> independ from the document type.

lxml's toolbox is actually larger than that. There's also lxml.objectify
which provides a Python object interface to the XML tree, similar to what
data binding would give you. And you can stick your own Element object
implementations into it if you feel a need to simplify the API itself
and/or adapt it to a given document format.

http://lxml.de/objectify.html

Stefan




More information about the Python-list mailing list