[IronPython] pyexpat for IronPython
tinuviel at sparcs.kaist.ac.kr
Wed Nov 16 13:00:29 CET 2005
pyexpat is a built-in XML parser for CPython. As this is not available
from IronPython, I wrote a wrapper around System.Xml.XmlTextReader to
fake the interface.
With this, an example from the Python Library Reference runs correctly:
My main interest is to use this with ElementTree, a very nice API to
deal with XML:
The most basic ElementTree operations already work correctly. Caveats:
1. repr() on ElementTree objects fail because %x formatting is not
2. Just unzipping ElementTree distribution and importing doesn't work.
Copy ElementTree.py, and ElementTree.py only, to somewhere in sys.path.
This is because ElementTree optionally imports ElementPath when present,
but ElementPath uses re.findall which is not implemented yet.
I am not experienced with .NET at all, and this is my first programming
in IronPython apart from toying. Comments welcome!
More information about the Ironpython-users