Easy question on minidom

Dean Card mailer at forums.com
Sat Jun 17 22:07:06 EDT 2006


I am using minidom to parse a 20,000 line XML file.  I have a few instances 
where the number of child nodes of a particular node can be variable in 
number.  To access them I am doing something like the following...

xmldoc = minidom.parseString(r)
results = xmldoc.childNodes[0]

for myNode in results.childNodes[1].childNodes:
    do Stuff with myNode...

problem is I am having a heck of a time trying to access the value of the 
node.  For instance I get things like this

<DOM Element: PersonName at 0x8391dac>
<DOM Element: PostalAddress at 0x8391f0c>
<DOM Element: VoiceNumber at 0x842a18c>
<DOM Element: VoiceNumber at 0x842a32c>
<DOM Element: E-mail at 0x842a4cc>

But I need the values... any help here? 





More information about the Python-list mailing list