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 :
>>>
>>>
>>>
>>>
>>>
>
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
[..]
>> 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
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 :
>
>
>
>
>
>
>
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