[Tutor] xml.etree.ElementTree.parse() against a XMLShema file

Karim karim.liateni at free.fr
Wed Dec 22 22:09:30 CET 2010

Thanks Stefan for answering.
That's  what I come up with.

Using lxml (except for the different import) will be fully compliant 
with the ET code.
Do I have to adapt it?

I saw your fantastic benchmarks! Why the hell lxml is not integrated 
into the stdlib.
I thought they put in it things which works at best for python interest ?


On 12/22/2010 09:56 PM, Stefan Behnel wrote:
> Karim, 22.12.2010 19:28:
>> On 12/22/2010 07:07 PM, Karim wrote:
>>> Is somebody has an example of the way to parse an xml file against a
>>> "grammary" file.xsd.
>> I found this:
>> http://www.velocityreviews.com/forums/t695106-re-xml-parsing-with-python.html 
>> Stefan is it still true the limitation of etree in python 2.7.1 ?
> Yes, ElementTree (which is in Python's stdlib) and lxml.etree are 
> separate implementations. If you want validation, use the lxml package.
> Stefan
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor

More information about the Tutor mailing list