parsing response from SOAPpy request

Larry Bates larry.bates at websafe.com
Sat Sep 1 01:42:10 CEST 2007


seancron wrote:
> I'm using SOAPpy to access weather data from the NOAA National Digital
> Forecast Database XML Web Service [1] and I've been having
> trouble figuring out how to parse the data.
> 
> The response comes back as XML document but when I check it with
> type(result) it shows the the response is a string.  Does anyone have
> any
> suggestions on getting relevant data?
> 
> Thanks,
> -Sean
> 
> [1] http://www.weather.gov/forecasts/xml/
> 
XML data is just a string of characters.  Use elementree xml parser (built into 
Python 2.5 available for download for prior versions) to parse it for what you 
want to extract.

-Larry



More information about the Python-list mailing list