cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper III
Helper III

Parsing and XMl file

Hi,

I am trying to parse an XML file that it stored in Sharepoint.

The file is loaded ok and when I check the first compose statement, the output is the full XML file.

However when I use xpath in a second compose step to search for a string/node the input is showing as [ ], i.e. empty.

 

Any ideas anyone, please!

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @MartinHutchcpa ,

 

Could you share a screenshot of the Flow configuration and details of expression?

If possible, could you provide a similar xml file for us to do further testing?

 

Please check if File content is encoded. If so, you may also need to use base64ToString() function to convert File content to a String value first.

Also for Parse XML data, please refer to similar thread and see if it helps:

Having-trouble-with-xPath-please-help

Iterate-XML-with-flow

Parse-XML-using-Microsoft-Flow

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Dual Super User III
Dual Super User III

The question is whether the output represents an XML document or just a string formatted as an XML document.  To use Xpath I think it needs to be an actual XMLDoc. Take a look at the following other post and note that in order to use XPath they encolse the output of the original Compose in an XML() function.  Are you doing something similar?



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Community Support
Community Support

Hi @MartinHutchcpa ,

 

Could you share a screenshot of the Flow configuration and details of expression?

If possible, could you provide a similar xml file for us to do further testing?

 

Please check if File content is encoded. If so, you may also need to use base64ToString() function to convert File content to a String value first.

Also for Parse XML data, please refer to similar thread and see if it helps:

Having-trouble-with-xPath-please-help

Iterate-XML-with-flow

Parse-XML-using-Microsoft-Flow

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Thanks, it was the base64tostring that I needed to incorporate.

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (57,463)