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: > > 1 > > 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 = ElementTree.fromstri

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: > > 1 > > 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 xpath from xml.dom i

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: > >1 > >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 = '''1''' In [22]: x = xml.dom.minidom.parseString(

Python xml.dom, help reading attribute data

2005-09-06 Thread Thierry Lam
Let's say I have the following xml tag: 1 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