Skip to content
This repository has been archived by the owner on Sep 14, 2018. It is now read-only.

IP 2.7.1 xml.etree.Elementree#iterparse is not working #968

Open
ironpythonbot opened this issue Dec 9, 2014 · 3 comments
Open

IP 2.7.1 xml.etree.Elementree#iterparse is not working #968

ironpythonbot opened this issue Dec 9, 2014 · 3 comments

Comments

@ironpythonbot
Copy link

from StringIO import StringIO as S
from xml.etree import ElementTree as ET
ET.iterparse(S(''))
-->
AttributeError: TreeBuilder instance has no attribute '_parser'

Seems that SimpleXMLTreeBuilder.TreeBuilder or xmllib.XMLParser should have
this for iterparser to work (or the sys.platform == 'cli' part should be
changed in ElementTree.py).

Anyway completely makes it impossible to use iterparse in xml.etree with
ironpython.

Work Item Details

Original CodePlex Issue: Issue 31923
Status: Active
Reason Closed: Unassigned
Assigned to: Unassigned
Reported on: Dec 12, 2011 at 10:38 AM
Reported by: mkorpela
Updated on: Nov 7 at 10:51 AM
Updated by: tcalmant

@ironpythonbot
Copy link
Author

On 2012-02-03 04:14:19 UTC, pekkaklarck commented:

It is somewhat weird that this is broken because nowadays IronPython ought to contain a working elementtree implementation [1] that is also available at [2]. What is really weird that this module works fine if I install it separately.

[1] http://ironpython.codeplex.com/workitem/31579

[2] http://effbot.org/zone/element-index.htm

@ironpythonbot
Copy link
Author

On 2012-02-11 15:23:49 UTC, jdhardy commented:

It turns out that iterparse is closely tied to the expat-based XML reader. Once
http://ironpython.codeplex.com/workitem/20023 is fixed then this one can be as well.

I improved the error message in 7f9fc2a.

@kunom
Copy link
Contributor

kunom commented Aug 16, 2016

See also #393.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants