Using Azure Logic App to select XML node values

manu 41 Reputation points

I have a requitement to node values in to array in logic apps.I tried Xpath with multiple ways ,but always getting null value.Could you please help how to get the values from XML.

Path: Upsscs/EcommerceNotification/OrderReferenceFields/ReferenceField.
Expected Values in Array is =[79787709,936N5D4CPU]


Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
2,787 questions
Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
1,960 questions
No comments
{count} votes

1 answer

Sort by: Most helpful
  1. MikeUrnun 5,501 Reputation points

    Hello @manu

    You can use the text() function in your xpath to query the nodes with text values, as follows: Upsscs/EcommerceNotification/OrderReferenceFields/ReferenceField[text()]

    In order to run this query in Logic Apps and work with the returned values as an array, you can use the xpath() function:

    From your example, that xpath should return the following nodes:

            <ReferenceField id="1">79787709</ReferenceField>  
            <ReferenceField id="2">936N5D4CPU</ReferenceField>   

    I hope this helps, let me know if you have any further questions.