Thierry Lam wrote: > Let's say I have the following xml tag: > > <para role="success">1</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 = ElementTree.fromstring("""<para role="success">1</para>""")
>>> node.text
'1'
>>> node.attrib["role"]
'success'
--
Giovanni Bajo
--
http://mail.python.org/mailman/listinfo/python-list
