Hi,
I am trying to parse an XML file that it stored in Sharepoint.
The file is loaded ok and when I check the first compose statement, the output is the full XML file.
However when I use xpath in a second compose step to search for a string/node the input is showing as [ ], i.e. empty.
Any ideas anyone, please!
Solved! Go to Solution.
Hi @MartinHutchcpa ,
Could you share a screenshot of the Flow configuration and details of expression?
If possible, could you provide a similar xml file for us to do further testing?
Please check if File content is encoded. If so, you may also need to use base64ToString() function to convert File content to a String value first.
Also for Parse XML data, please refer to similar thread and see if it helps:
Having-trouble-with-xPath-please-help
Parse-XML-using-Microsoft-Flow
Best Regards,
The question is whether the output represents an XML document or just a string formatted as an XML document. To use Xpath I think it needs to be an actual XMLDoc. Take a look at the following other post and note that in order to use XPath they encolse the output of the original Compose in an XML() function. Are you doing something similar?
Hi @MartinHutchcpa ,
Could you share a screenshot of the Flow configuration and details of expression?
If possible, could you provide a similar xml file for us to do further testing?
Please check if File content is encoded. If so, you may also need to use base64ToString() function to convert File content to a String value first.
Also for Parse XML data, please refer to similar thread and see if it helps:
Having-trouble-with-xPath-please-help
Parse-XML-using-Microsoft-Flow
Best Regards,
Thanks, it was the base64tostring that I needed to incorporate.
Hi all,
I've a similar situation. An XML file saved on sharepoint and i'm not able to parse it with Xpath.
below an example from my xml file:
I would like to extract some fields from the header Fiscal Year and End Date and fields from the xml body section.
<ns:StockFile xmlns:ns="urn:StockFile:PT_1_02" xmlns:doc="urn:schemas-basda-org:schema-extensions:documentation" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ns:StockHeader>
<ns:FileVersion>1_02</ns:FileVersion>
<ns:TaxRegistrationNumber>00000000</ns:TaxRegistrationNumber>
<ns:FiscalYear>2020</ns:FiscalYear>
<ns:EndDate>2020-12-31</ns:EndDate>
<ns:NoStock>false</ns:NoStock>
</ns:StockHeader>
<ns:Stock>
<ns:ProductCategory>M</ns:ProductCategory>
<ns:ProductCode>341252452345</ns:ProductCode>
<ns:ProductDescription>Care Kit Tube</ns:ProductDescription>
<ns:ProductNumberCode>660042376824</ns:ProductNumberCode>
<ns:ClosingStockQuantity>188.0</ns:ClosingStockQuantity>
<ns:UnitOfMeasure>Un</ns:UnitOfMeasure>
<ns:ClosingStockValue>2133.48</ns:ClosingStockValue>
</ns:Stock>
<ns:Stock>
<ns:ProductCategory>M</ns:ProductCategory>
<ns:ProductCode>09003NAVFW16</ns:ProductCode>
<ns:ProductDescription>DEE NAVY</ns:ProductDescription>
<ns:ProductNumberCode>09003NAVFW16</ns:ProductNumberCode>
<ns:ClosingStockQuantity>1.0</ns:ClosingStockQuantity>
<ns:UnitOfMeasure>Un</ns:UnitOfMeasure>
<ns:ClosingStockValue>18.65</ns:ClosingStockValue>
</ns:Stock>
Check out new user group experience and if you are a leader please create your group
See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.
User | Count |
---|---|
46 | |
44 | |
38 | |
37 | |
33 |