I have the following soap response saved as an inline string. I just formatted it for easier reading:
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ns:getUserResponse xmlns:ns="http://www.cisco.com/AXL/API/10.0">
<return>
<user uuid="{SOME-IDENTIFIER-HERE}">
<firstName>MyFirstName</firstName>
<middleName />
<lastName>MyLastName</lastName>
<userid>myId</userid>
<password />
<pin />
<mailid>myEmail@myEmail.com</mailid>
<department />
<manager />
<userLocale />
</user>
</return>
</ns:getUserResponse>
</soapenv:Body>
</soapenv:Envelope>
How may I be able to parse through this and get specific element values inside this response? I was thinking of converting the string to an XML first and do parsing after.
Can anyone shed some light on how I could achieve this?
Thanks