cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
avargas
Frequent Visitor

How to use xpath to parse xml file to extract same attribute but different node element

I built a flow where it obtains XML files from a Document Library, then it parses the files inside each XML elements using xpath Expression and adds the info into a Sharepoint List. The problem is that there is an attribute called "Rfc" that is inside two node elements, which are "emisor" and "receptor". I can extract the info without problem using the xpath function from "emisor" node element, however i also want to extract "receptor" node as well. The xpath code i used is this one but does not work

 

xpath(xml(outputs('Parseo')), 'string(//Receptor[@Rfc])')

 

 

 Here is an example from the XML file content, the attribute marked with the arrow is the one i want : 

 

ejemplo parseo 1.pngejemplo parseo 2.png

 

And this is my flow:

 

ejemplo flujo 1.png

 

ejemplo flujo 2.png

 

ejemplo flujo 3.png

 

ejemplo flujo 4.png

 

Thanks for your support!

1 ACCEPTED SOLUTION

Accepted Solutions
v-litu-msft
Community Support
Community Support

Hi @avargas,

 

There is the document about XPath() function, there are more details about how to use it in Flow, hope it could help you:

https://docs.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference#x...

 

Best Regards,
Community Support Team _ Lin Tu
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

1 REPLY 1
v-litu-msft
Community Support
Community Support

Hi @avargas,

 

There is the document about XPath() function, there are more details about how to use it in Flow, hope it could help you:

https://docs.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference#x...

 

Best Regards,
Community Support Team _ Lin Tu
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

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Users online (20,641)