Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #43759
| From | Ombongi Moraa Fe <moraa.lovetakes2@gmail.com> |
|---|---|
| Date | 2013-04-17 16:50 +0300 |
| Subject | Parsing soap result |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.723.1366206668.3114.python-list@python.org> (permalink) |
[Multipart message — attachments visible in raw view] - view raw
My
client.service.gere(ri)
method call logs the below soap response in my log file.
<?xml version="1.0" encoding="utf-8" ?><soapenv:Envelope xmlns:soapenv="
http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><ns1:gere
xmlns:ns1="http://www.csapi.org/schema/parlayx/sms/send/v2_2/local
"><ns1:result><address>254727</address><deliveryStatus>DeliveredToNetwork</deliveryStatus></ns1:result></ns1:gere></soapenv:Body></soapenv:Envelope>
If I assign the client.service.gere(ri) to a variable, i get the output on
my screen:
result=client.service.gere(ri)
output:
[(DeliveryInformation){
address = "254727"
deliveryStatus = "DeliveredToNetwork"
}]
string functions replace() and strip don't work.
how do I use xml.etree.ElementTree to print the parameters address and
deliveryStatus? Or is there a better python method?
Thanks in advance.
Saludos
Ombongi Moraa Faith
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Parsing soap result Ombongi Moraa Fe <moraa.lovetakes2@gmail.com> - 2013-04-17 16:50 +0300
Re: Parsing soap result darnold <darnold992000@yahoo.com> - 2013-04-17 10:55 -0700
Re: Parsing soap result Christian Heimes <christian@python.org> - 2013-04-17 20:05 +0200
Re: Parsing soap result darnold <darnold992000@yahoo.com> - 2013-04-17 12:14 -0700
csiph-web