I am trying to parse the following XML.
<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>
<GetTokenResponse xmlns="http://www.xx.co.uk/Services/Sourcing/xx">
<GetTokenResult><?xml version="1.0" encoding="utf-8"?><GetTokenResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.xxx.co.uk/Services/xx"><Version /><Header><CorrelationID xmlns="" /><ResponseEndPoint xmlns="" /><ResponseType xmlns="">Response</ResponseType></Header><Errors /><Data><Response><Version xmlns="" /><Token xmlns="">CK-RUWelME68FGRJ3IpSf8MJ2T9XUazdJy-ll3uRzKc</Token><AccessStatus xmlns="">Granted</AccessStatus></Response></Data></GetTokenResponse>></GetTokenResult>
</GetTokenResponse>
</soap:Body>
</soap:Envelope>
I have tried parsing it using XmlStreamReader
and Doc.Document
but as soon as I hit the internal xml document (string inside <GetTokenResult>
tag), it's unable to parse it.
</GetTokenResponse>
tags in your code.