I have two different Strings for example:
1)
HTTP/1.1 200 OK
Content-Length: 144
content-type: application/xml
Date: Wed, 11 Nov 2015 12:57:07 GMT
Server: Jetty(7.5.4.v20111024)
Note: Header order may not reflect actual transmitted stream.
<?xml version="1.0" encoding="UTF-8"?>
<Log>
<Code>0</Code>
<SensitiveData2>Data Is Here</SensitiveData2>
</Log>
2)
HTTP/1.1 200 OK
Content-Type: text/xml;charset=UTF-8
Content-Length: 1099
Server: Jetty(7.5.4.v20111024)
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<Response_Phase_IIResponse xmlns="http://tempuri.org/">
<Response_Phase_IIResult>
<Address_Parameters_Phase_II>
<Setup_In_CRM>NO</Setup_In_CRM>
<CRM_Profile_ID>0</CRM_Profile_ID>
</Address_Parameters_Phase_II>
</Response_Phase_IIResult>
</Response_Phase_IIResponse>
</soap:Body>
</soap:Envelope>
I need to parse these strings and fetch the entire XML element from root node without any headers. How do I achieve this?
<?xml
or
<soap: