[BangPypers] [Small Hitch]Minidom and xml parsing.

Amit Sethi amit.pureenergy at gmail.com
Tue Jul 12 09:03:38 CEST 2011


[..]
>> I am fairly new to python and i am stuck with a problem.
>> What I am  trying to do is parse a xml file using minidom. My xml file
>> as almost a structure like this :
>>
>> <someparentabove>
>>       <parent>
>>              <child1>
>>              </child1>
>>              <child2>
>>              </child2>
>>      </parent>
>>      <anotherparent>
>>      </anotherparent>
>> </someparentabove>
Not knowing exactly what you are doing i would recommed using
.childNodes to iterate over all the children and use .childNodes to
see if there are no further children you are on child1 or child2


-- 
A-M-I-T S|S


More information about the BangPypers mailing list