Hi,
I'm trying to change the xml format of an HTTP request to JSON format using the xpath expression in flow.
Here is my xml :
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml" xml:base="https://tenant.sharepoint.com/sites/sitename/_api/">
<id>d1fd24b2-eeb1-4820-a545-f071653f467e</id>
<title/>
<updated>2017-12-01T10:40:43Z</updated>
<entry m:etag=""4"">
<id>cda821b5-e13b-4dff-9c2e-5be55f5fa3d1</id>
<category term="SP.Data.EmployeesListItem" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/>
<link rel="edit" href="Web/Lists(guid'5b359dba-549b-4210-8afa-5e4fe2aeb166')/Items(3431)"/>
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/LineManager" type="application/atom+xml;type=entry" title="LineManager" href="Web/Lists(guid'5b359dba-549b-4210-8afa-5e4fe2aeb166')/Items(3431)/LineManager">
<m:inline>
<entry>
<id>4f07e464-50cd-4faf-8324-8a4b26878b5a</id>
<category term="SP.Data.UserInfoItem" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/>
<title/>
<updated>2017-12-01T10:40:43Z</updated>
<author>
<name/>
</author>
<content type="application/xml">
<m: properties>
<d:EMail>testemail@test.com</d:EMail>
<d:Title>ps admin</d:Title>
</m: properties>
</content>
</entry>
</m:inline>
</link>
<title/>
<updated>2017-12-01T10:40:43Z</updated>
<author>
<name/>
</author>
<content type="application/xml">
<m: properties>
<d: PSFullName>PS Employee</d: PSFullName>
</m: properties>
</content>
</entry>
</feed>
Here is my expression :
xpath(xml(body('Invoke_an_HTTP_request')), string('/feed/entry/link[2]/m:inline/entry/content/m: properties/d:EMail'))
I get the follwing error :
InvalidTemplate. Unable to process template language expressions in action 'Set_variable' inputs at line '1' and column '2158': 'The template language function 'xpath' parameters are invalid: the 'xpath' parameter must be a supported, well formed XPath expression. Please see https://aka.ms/logicexpressions#xpath for usage details.'.
The desired result is to retrieve the email address in the <d:Email > tag.
Thanks for any help in advance,
Macaurly.