xpath logic app help

ShaneG 21 Reputation points

I am trying to run an xpath and set a variable that I have previously intialized and running into issues with no value being provided.

Here is the xml example that is being retured via a HTTP Post:

<?xml version="1.0" encoding="utf-8"?>
<buyer_addedit_response xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://cakemarketing.com/api/1/">
<message>Buyer (29) Created Successfully</message>

Here is the xpath I have set in the variable:

The goal is the store the value 29 from the xml abovew in the variable I have created, but instead I am only getting [ ].

Any help would be appreciated.

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
2,706 questions
0 comments No comments
{count} votes

Accepted answer
  1. MayankBargali-MSFT 66,671 Reputation points

    Hi @ShaneG

    Welcome to Microsoft Q&A! Thanks for posting the question.

    As your XML response has a namespace you can refer to Example 8 and Example 9 of the xpath document
    I have tested it using the string variable content at my end therefore the first parameter of xpath I am converting my string content to XML



    In your case it would be if you are converting to string or you can use int.

    Hope the above helps you to resolve the issue. Feel free to get back to me if you need any assistance.

    Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.

0 additional answers

Sort by: Most helpful