parsing response from SOAPpy request

S

seancron

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/
 
L

Larry Bates

seancron said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top