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

Subhodip Biswas subhodipbiswas at gmail.com
Tue Jul 12 12:49:38 CEST 2011


Hi,




On Tue, Jul 12, 2011 at 12:33 PM, Amit Sethi <amit.pureenergy at gmail.com> wrote:
> [..]
>>> 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
>

I have a soap call with a method someMethod(ChildType Child1,
ChildType2 Child2). I am trying to read and put in child1 and child2.
I can try to put in the whole xml(request) as a payload but that does
not work due to some internal error.

Element tree is good but I cannot go and change the minidom code
already written, anyways let me see If I can do something with these.

-------------
Regards
Subhodip Biswas


GPG key : FAEA34AB
Server : pgp.mit.edu
http://subhodipbiswas.wordpress.com
http:/www.fedoraproject.org/wiki/SubhodipBiswas


More information about the BangPypers mailing list