Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Parsing Soap XML response
#8
(Jun-14-2019, 12:32 AM)grootkarzijn Wrote: Probably are the methods the same.
Then you could have tried Dodgy
>> soup.find('type').text
'CALL_RECEIVED'

>>> s = soup.find_all('device')
>>> s[0].find_all('attributeValue')
[<attributeValue>104</attributeValue>,
 <attributeValue>name1</attributeValue>,
 <attributeValue>INTERNAL_DEVICE_TYPE</attributeValue>]

>>> [tag.text for tag in s[0].find_all('attributeValue')]
['104', 'name1', 'INTERNAL_DEVICE_TYPE']
>>> [tag.text for tag in s[1].find_all('attributeValue')]
['103', 'name2', '104', '2219', 'INTERNAL_DEVICE_TYPE']
Reply


Messages In This Thread
Parsing Soap XML response - by grootkarzijn - Jun-12-2019, 09:38 PM
RE: Parsing Soap XML response - by snippsat - Jun-12-2019, 11:38 PM
RE: Parsing Soap XML response - by grootkarzijn - Jun-13-2019, 09:26 PM
RE: Parsing Soap XML response - by snippsat - Jun-13-2019, 09:33 PM
RE: Parsing Soap XML response - by grootkarzijn - Jun-13-2019, 10:36 PM
RE: Parsing Soap XML response - by snippsat - Jun-13-2019, 11:18 PM
RE: Parsing Soap XML response - by grootkarzijn - Jun-14-2019, 12:32 AM
RE: Parsing Soap XML response - by snippsat - Jun-14-2019, 01:30 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Zeep lib, encrypt soap body miha1234 0 2,855 Sep-12-2019, 07:52 AM
Last Post: miha1234
  Issues parsing the response from a request garnold 3 2,562 May-14-2019, 12:39 PM
Last Post: snippsat
  SOAP based webservice invoke mehrdadabedi 1 2,354 Mar-10-2019, 06:04 PM
Last Post: mlieqo
  How to retrieve and save attachments returned by SOAP web service ashwsrin 0 2,626 Feb-20-2019, 07:12 AM
Last Post: ashwsrin
  SOAP/XML input Help duguarun 0 2,492 Jun-08-2018, 10:20 AM
Last Post: duguarun
  extracting data from XML/SOAP hey_arnold 4 4,793 May-07-2018, 09:23 AM
Last Post: hey_arnold
  Soap json program rahul208in 5 3,884 Jan-11-2018, 05:28 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020