parsing response from SOAPpy request

Discussion in 'Python' started by seancron, Sep 1, 2007.

  1. seancron

    seancron Guest

    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/
     
    seancron, Sep 1, 2007
    #1
    1. Advertising

  2. seancron

    Larry Bates Guest

    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
     
    Larry Bates, Sep 1, 2007
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brian Birtle
    Replies:
    2
    Views:
    2,185
    John Saunders
    Oct 16, 2003
  2. Replies:
    1
    Views:
    6,350
    Ryan Stewart
    Dec 29, 2004
  3. Jeremiah McElroy

    SOAPpy/Oracle errors

    Jeremiah McElroy, Jul 21, 2003, in forum: Python
    Replies:
    0
    Views:
    319
    Jeremiah McElroy
    Jul 21, 2003
  4. Doug Farrell
    Replies:
    0
    Views:
    655
    Doug Farrell
    Aug 28, 2003
  5. Matias Surdi

    Adding a HTTP header to a SOAPpy request

    Matias Surdi, Jan 3, 2008, in forum: Python
    Replies:
    3
    Views:
    1,134
    sharonxi1205
    Jun 21, 2011
Loading...

Share This Page