[BangPypers] parsing xml

Kenneth Gonsalves lawgon at gmail.com
Thu Jul 28 12:31:38 CEST 2011


On Thu, 2011-07-28 at 15:33 +0530, Anand Chitipothu wrote:
> > I want to get the value of the distance element - 1489. What is the
> > simplest way of doing this?
> 
> >>> from xml.dom import minidom
> >>> dom = minidom.parseString(x)
> >>> dom.getElementsByTagName("distance")[0].childNodes[0].nodeValue
> u'1489' 

thanks - perfect.
-- 
regards
Kenneth Gonsalves



More information about the BangPypers mailing list