@@ -3174,39 +3174,14 @@ xpath('<xml>', '<xpath>')
3174
3174
3175
3175
* Example 1*
3176
3176
3177
- This example finds nodes that match the ` <name></name> ` node
3178
- in the specified arguments, and returns an array with those node values:
3179
-
3180
- ` xpath(xml(parameters('items')), '/produce/item/name') `
3181
-
3182
- Here are the arguments:
3183
-
3184
- * The "items" string, which contains this XML:
3185
-
3186
- ` "<?xml version="1.0"?> <produce> <item> <name>Gala</name> <type>apple</type> <count>20</count> </item> <item> <name>Honeycrisp</name> <type>apple</type> <count>10</count> </item> </produce>" `
3187
-
3188
- The example uses the [ parameters()] ( #parameters ) function to get
3189
- the XML string from the "items" argument, but must also convert
3190
- the string to XML format by using the [ xml()] ( #xml ) function.
3191
-
3192
- * This XPath expression, which is passed as a string:
3193
-
3194
- ` "/produce/item/name" `
3195
-
3196
- Here is the result array with the nodes that match ` <name></name ` :
3197
-
3198
- ` [ <name>Gala</name>, <name>Honeycrisp</name> ] `
3199
-
3200
- * Example 2*
3201
-
3202
3177
Following on Example 1, this example finds nodes that match the
3203
3178
` <count></count> ` node and adds those node values with the ` sum() ` function:
3204
3179
3205
3180
` xpath(xml(parameters('items')), 'sum(/produce/item/count)') `
3206
3181
3207
3182
And returns this result: ` 30 `
3208
3183
3209
- * Example 3 *
3184
+ * Example 2 *
3210
3185
3211
3186
For this example, both expressions find nodes that match the
3212
3187
` <location></location> ` node, in the specified arguments,
@@ -3241,7 +3216,7 @@ Here is the result node that matches the `<location></location>` node:
3241
3216
<location xmlns =" https://contoso.com" >Paris</location >
3242
3217
```
3243
3218
3244
- * Example 4 *
3219
+ * Example 3 *
3245
3220
3246
3221
Following on Example 3, this example finds the value in the
3247
3222
` <location></location> ` node:
0 commit comments