Jun-12-2019, 09:38 PM
Hi,
I'm a Python newbie.
Still learning and following tutorials etc.
At this moment i'm trying to learn REST/SOAP api's.
I'm able to parse json results, but i'm not able to find a piece of code which can parse my XML response.
I want to retrieve "result" and "sessionId"
Would be nice if someone can help me or point me to the right direction,
Thanks in advance,
Richard
XML Response:
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
<ns2:loginResponse xmlns:ns2="http://xyz/gss/session/SessionService">
<ns2:return result="true" sessionId="7111510180479788278"/>
</ns2:loginResponse>
</soapenv:Body>
</soapenv:Envelope>
I'm a Python newbie.
Still learning and following tutorials etc.
At this moment i'm trying to learn REST/SOAP api's.
I'm able to parse json results, but i'm not able to find a piece of code which can parse my XML response.
I want to retrieve "result" and "sessionId"
Would be nice if someone can help me or point me to the right direction,
Thanks in advance,
Richard
XML Response:
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
<ns2:loginResponse xmlns:ns2="http://xyz/gss/session/SessionService">
<ns2:return result="true" sessionId="7111510180479788278"/>
</ns2:loginResponse>
</soapenv:Body>
</soapenv:Envelope>