python from Java

Fredrik Lundh fredrik at
Tue Sep 7 17:47:57 CEST 2004

"Ajay" <abra9823 at> wrote:

>> ElementTree
> okay i tried the above approaches but no luck. See the problem is an XML
> parser which works on a PDA - pythonce. Now elementtree uses pyexpat
> (which  pythonce doesn't have)

that's why ElementTree ships with several alternative tree builders;
from the README:
        Old element tree builder for XML, based on
        xmllib, for Python versions where "expat" is
        not available


    from elementtree import ElementTree, SimpleXMLTreeBuilder

    tree = ElementTree.parse(
        source, SimpleXMLTreeBuilder.TreeBuilder()

note that xmllib has problems with namespaces on some versions
of Python; see the elementtree README for details.


More information about the Python-list mailing list