Python xml.dom, help reading attribute data

2005-09-06 Thread Thierry Lam
Let's say I have the following xml tag: para role=success1/para I can't figure out what kind of python xml.dom codes I should invoke to read the data 1? Any help please? Thanks Thierry -- http://mail.python.org/mailman/listinfo/python-list

Re: Python xml.dom, help reading attribute data

2005-09-06 Thread Jeremy Jones
Thierry Lam wrote: Let's say I have the following xml tag: para role=success1/para I can't figure out what kind of python xml.dom codes I should invoke to read the data 1? Any help please? Thanks Thierry In [20]: import xml.dom.minidom In [21]: s = '''para role=success1/para''' In [22]:

Re: Python xml.dom, help reading attribute data

2005-09-06 Thread Alan Kennedy
[Thierry Lam] Let's say I have the following xml tag: para role=success1/para I can't figure out what kind of python xml.dom codes I should invoke to read the data 1? Any help please? This is job for xpath. #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= from xml import

Re: Python xml.dom, help reading attribute data

2005-09-06 Thread Giovanni Bajo
Thierry Lam wrote: Let's say I have the following xml tag: para role=success1/para I can't figure out what kind of python xml.dom codes I should invoke to read the data 1? Any help please? Thanks Thierry If you use elementtree: from elementtree import ElementTree node =