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

2011-07-12 Thread Subhodip Biswas
Hi, On Tue, Jul 12, 2011 at 12:33 PM, Amit Sethi 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 : >>> >>> >>>       >>>               >>>               >

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

2011-07-12 Thread Nitin Kumar
are you limited to use DOM? if not then you can also use elementtree for ex: from xml.etree import ElementTree as ET fp=open('try.xml') #your xml file xmlData = fp.read() tree = ET.XML( xmlData ) listroot = list(tree) for item in listroot: if(item.tag == "parent"): for dc

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

2011-07-12 Thread Amit Sethi
[..] >> 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 : >> >> >>       >>               >>               >>               >>               >>       >>       >>       >> Not kno

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

2011-07-11 Thread Venkatraman S
On Tue, Jul 12, 2011 at 12:20 PM, Subhodip Biswas 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 : > > > > > > >

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

2011-07-11 Thread Subhodip Biswas
Hi all, 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 : I can get parent along with childs