Before someone points out that there are a ton of similar questions like this, please keep in mind I have tried and exhausted all methods I could find here on stacked.
I'm having trouble using simplexml to pull out the data I want from a response that is structured like this.
<soap:envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:body>
<authenticateresponse xmlns="http://somesite.co.nz">
<authenticateresult>
<username>Username</username>
<token>XXXXXXXXX</token>
<reference>
<message>Access Denied</message>
</reference>
</authenticateresult>
</authenticateresponse>
</soap:body>
In this case I'd like to know how to pull out the token and username.