Newbie needs help extracting data from XML

Rodney rodney_garland at
Fri Dec 30 01:46:06 CET 2005

Thanks for the help

This was a SOAP Webservice message.  I used httplib instead of SOAPpy or ZSI 
because SOAPpy cann't do arrays of complex type and ZSI was confusing.

Thanks again

"Rodney" <rodney_garland at> wrote in message 
news:qs2dndtmv51Rui7eRVn-uw at
> Hi,
> Im a Python newbie and am trying to get the data out of a series of XML 
> files.  So for example the xml is:
> <?xml version="1.0" encoding="utf-8"?><soap:Envelope 
> xmlns:soap="" 
> xmlns:soapenc="" 
> xmlns:tns="" 
> xmlns:types="" 
> xmlns:xsi="" 
> xmlns:xsd=""><soap:Header><wsu:Timestamp 
> xmlns:wsu=""><wsu:Created>2005-12-28T05:59:38Z</wsu:Created><wsu:Expires>2005-12-28T06:04:38Z</wsu:Expires></wsu:Timestamp></soap:Header><soap:Body 
> soap:encodingStyle=""><q1:NodePingResponse 
> xmlns:q1=""><return 
> xsi:type="xsd:string">Ready</return></q1:NodePingResponse></soap:Body></soap:Envelope>
> and I want to get the value from the element "return" which currently has 
> a value of "Ready".
> Other XML files I want to work with may have several elements I want to 
> pull data from.  This seem relatively easy but I have been reading and 
> cruising google for hours and none of the examples make any sense.
> I appreciate any code writing help with this.

More information about the Python-list mailing list