Hi,
I want to transform XML data to another XML format, I receive it by e-mail.
In Flow I created receive from mail, that works well, from a simple XML I get a xml value with xpath.
But from the XML below I cannot get the UniqueCreatorIdentification value.
I use this code:
xpath(xml(body('Bijlage_ophalen')), 'string(/pay:invoice/invoiceIdentification/uniqueCreatorIdentification)')
What is wrong with this code?
Is this te best way to transform a XML to another format XML or is there a better way?
I want to use compose to put the values from the original file into the new file and save the file in the new format XML and store it with FTP.
Kind regards,
Rob
<?xml version="1.0" encoding="UTF-8" ?>
<pay:invoice xmlns:pay="urn:ean.ucc:pay:2" xmlns:eanucc="urn:ean.ucc:2" xmlns:px="urn:ean.ucc:pay:vat:2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:ean.ucc:pay:2 Factuur_bou002.xsd" creationDateTime="" documentStatus="ORIGINAL">
documentStructureVersion>
<versionIdentification>002</versionIdentification>
</documentStructureVersion>
<invoiceIdentification>
<uniqueCreatorIdentification>452823</uniqueCreatorIdentification>
<contentOwner>
<gln>8714xxxxxxxxxx</gln>
</contentOwner>
</invoiceIdentification>
<invoiceCurrency>
<currencyISOCode>EUR</currencyISOCode>
</invoiceCurrency>
<invoiceType>INVOICE</invoiceType>
<shipTo>
<gln>0000000000000</gln>
</shipTo>
.. and further..