Skip to content

Commit 3a8b1ba

Browse files
Merge pull request #247576 from mike-urnun-msft/mike-urnun-msft-patch-1
(Azure CXP) update xpath() sample
2 parents 6e8b61c + 2b39925 commit 3a8b1ba

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

articles/logic-apps/workflow-definition-language-functions-reference.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5385,15 +5385,15 @@ Suppose that you have this `'items'` XML string:
53855385
</produce>
53865386
```
53875387

5388-
This example passes in the XPath expression, `'/produce/item/name'`, to find the nodes that match the `<name></name>` node in the `'items'` XML string, and returns an array with those node values:
5388+
This example passes in the XPath expression, `'/produce/item/name/text()'`, to find the nodes that match the `<name></name>` node in the `'items'` XML string, and returns an array with those node values:
53895389

5390-
`xpath(xml(parameters('items')), '/produce/item/name')`
5390+
`xpath(xml(parameters('items')), '/produce/item/name/text()')`
53915391

53925392
The example also uses the [parameters()](#parameters) function to get the XML string from `'items'` and convert the string to XML format by using the [xml()](#xml) function.
53935393

5394-
Here's the result array with the nodes that match `<name></name`:
5394+
Here's the result array populated with values of the nodes that match `<name></name>`:
53955395

5396-
`[ <name>Gala</name>, <name>Honeycrisp</name> ]`
5396+
`[ Gala, Honeycrisp ]`
53975397

53985398
*Example 2*
53995399

0 commit comments

Comments
 (0)