On Mar 1, 12:46 pm, [EMAIL PROTECTED] wrote:
> 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.

Most simply, if you need to stick with xml.dom.minidom; just check the
nodeType and make sure its not 3 (textNode):

from xml.dom import minidom
doc = minidom.parse(fileTest)
for item in doc.documentElement.childNodes:
    if not item.nodeType == 3:
        print item.nodeName

Regards,
Jordan

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to