xml minidom redundant children??

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Thu Mar 1 18:49:52 EST 2007


En Thu, 01 Mar 2007 15:46:53 -0300, <bkamrani at gmail.com> escribió:

> As a newbie, I'm trying to simply parse a xml file using minidom, but
> I don't know why I get some extra children(?). I don't know what is
> wrong in xml file, but I've tried different xml files, still same
> problem.

If you don't have to use exactly xml.dom.minidom, try using ElementTree  
http://www.effbot.org/zone/element-index.htm (it's already included with  
Python 2.5, for earlier versions you have to download and install it).
It's a lot easier and clean if you are mostly concerned about the infoset  
rather than its representation.

-- 
Gabriel Genellina




More information about the Python-list mailing list