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 > > > In [20]: import xml.dom.minidom In [21]: s = '''<para role="success">1</para>''' In [22]: x = xml.dom.minidom.parseString(s) In [23]: print x.firstChild.firstChild.data 1 I doubt this really answers what you're really wanting to ask. And this is a really really brittle way of trying to parse XML. But it answers exactly what you're asking. Hope it gives you the start you need. Post a follow-up when you have more questions. JMJ
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4