I am having trouble parsing the following xml file with xpath:
http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml
What would be the correct expression to obtain the 'time' attribute?
I have tried this after an HTTP call:
xpath(xml(body('HTTP')),'string(gesmes:Envelope/Cube/Cube/@time)')
However, I got the following error:
The template language function 'xpath' parameters are invalid: the 'xpath' parameter must be a supported, well formed XPath expression. Please see https://aka.ms/logicexpressions#xpath for usage details.
I had a look at the documentation but it did not help.
Any help most welcome, picture of the flow is here:
Maybe @yoshihirok or @v-micsh-msft can help with this? Please?
Solved! Go to Solution.
Hi @Meneghino,
Take a try with the expression below:
xpath(xml(body('Http')), 'string(//@time)')
Image reference:
Results as below:
For the Xpath expression, check:
I also tested with the Xpath node, but havn't figure out the structure of the XML file used here.
Specifying the Xpath with node will always result in error. (need more testing, : )
Regards,
Michael
Hi @Meneghino,
Take a try with the expression below:
xpath(xml(body('Http')), 'string(//@time)')
Image reference:
Results as below:
For the Xpath expression, check:
I also tested with the Xpath node, but havn't figure out the structure of the XML file used here.
Specifying the Xpath with node will always result in error. (need more testing, : )
Regards,
Michael
Hi @v-micsh-msft, I'm having some trouble as well parsing XML with Flow. Can you see what I'm doing wrong?
xpath(xml(outputs('Compose')), '(/MyModel/ASSET_ALIAS)')
What am I missing?
You need to replace xmnls from output. Here how I was able to replace that.
User | Count |
---|---|
87 | |
43 | |
21 | |
18 | |
15 |
User | Count |
---|---|
130 | |
47 | |
42 | |
35 | |
28 |