is elementTree really a part of python 2.6?

Chris Rebert clp2 at rebertia.com
Thu Oct 28 04:43:25 EDT 2010


On Thu, Oct 28, 2010 at 1:23 AM, hackingKK <hackingkk at gmail.com> wrote:
> Hello all,
> Some days back I had asked a few questions about parsing xml files using
> python.
> I have tryed dom.minidom module but I did not like the prittyPrint way of
> writing nodes.
> There were many other things I did not quite like about dom.minidom, so now
> trying to use elementTree.
> But to my surprise, I could not import xml.elementtree in my default python
> 2.6 setup.

The module is called xml.etree.ElementTree, *not* xml.elementtree.
It's been in Python since v2.5.

Cheers,
Chris
--
http://blog.rebertia.com



More information about the Python-list mailing list