[lxml-dev] lxml.etree.parse doesn't take parser argument into account?

Christian Zagrodnick cz at gocept.com
Mon Jun 11 15:39:47 CEST 2007


Hi,

maybe I'm doning something very wrong here. Regarding the following:

In [1]:import StringIO

In [2]:import lxml.etree

In [3]:import lxml.objectify

In [4]:parser = lxml.etree.XMLParser()

In 
[5]:parser.setElementClassLookup(lxml.objectify.ObjectifyElementClassLookup())

In 

[6]:lxml.etree.parse(StringIO.StringIO("<a/>"), parser)
Out[6]:<etree._ElementTree object at 0x1450e40>


I would have expected to get an objectified element out of the parse 
call. What am I missing here? Or is this a bug?

This is lxml-1.3beta-py2.4-macosx-10.4-i386.

-- 
Christian Zagrodnick

gocept gmbh & co. kg  ·  forsterstrasse 29 · 06112 halle/saale
www.gocept.com · fon. +49 345 12298894 · fax. +49 345 12298891





More information about the lxml-dev mailing list