
I would be interested in a solution to that issue, too. On Wed, Jul 7, 2010 at 16:25, Adam Bielański <ab@rdprojekt.pl> wrote:
Hello,
I'm calling creating object with "etree.iterparse(open('NotValidFile.xml'), schema=schema)" and iterating over it raises etree.XMLSyntaxError, as expected.
Unfortunately, value of 'position' attribute of that error is (0,0). Value of 'offset' attribute is None. Is there a way to get at least the line number of the offending tag in my XML file?
When etree.XMLSyntaxError is raised in etree.XML(), it contains position info pointing precisely to the place where error occured. Is it possible also when using iterparse() ?
Regards, Adam Bielański.
_______________________________________________ lxml-dev mailing list lxml-dev@codespeak.net http://codespeak.net/mailman/listinfo/lxml-dev
-- Simon Hirscher http://simonhirscher.de