Hi,
I am trying to retrieve a string within an XML response and convert it into JSON format to return in a Response connector. So far I have been unable to access the value needed in <ResultData>.
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<GetAllPeopleResponse xmlns="http:......">
<GetAllPeopleResult>
<ResultCode>200</ResultCode>
<ResultText>OK</ResultText>
<SurpassRef>-1</SurpassRef>
<RemoteRef />
<ResultData xsi:type="xsd:string">{
"data": [{
"ID": 3,
"Name": "Joe Smith",
"Color": "#FF8C00"
},
{
"ID": 13,
"Name": "Ed Jones",
"Color": "#48D1CC"
},
]}
</ResultData>
</GetAllPeopleResult>
</GetAllPeopleResponse>
</soap:Body>
</soap:Envelope>

This Flow is invoked by an HTTP Request from an application, which the Flow then proceeds to call an API that returns the XML data. I'm missing a step between "Compose" and "Response" where I hope to be able to convert the string (that looks like JSON) into JSON format, but first I need the string!
"Compose" is using an expression and this is where I'm getting stuck:
xpath(xml(body('HTTP')), '//Envelope')
I can't seem to get beyond the first element. This expression above returns an empty array. Anything else has returned an invalid xpath parameter.
The end result is to have this Flow called by a custom connector that returns JSON.
Any insight is appreciated!
Thanks in advance.