question

RicardoJimenezArg-3400 avatar image
0 Votes"
RicardoJimenezArg-3400 asked DSPatrick answered

Get XML element with Power Automate that includes the XML document namespace

I'm trying to get xml elements value using Power Automate action "Get XML element value", the flow parses when reading XML from file and the errors pops with the following legend: "XPath expression returned no element". on XPath query I typed: "FacturaElectronica/Clave"

Don't know if the problem is that file includes the XML document namespace, does anyone has this same issue?

Couldn't upload the XML file, but this is the transcript of the file:

<?xml version="1.0" encoding="utf-8"?><FacturaElectronica xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://cdn.comprobanteselectronicos.go.cr/xml-schemas/v4.3/facturaElectronica"><Clave>1852</Clave><CodigoActividad>5520</CodigoActividad><NumeroConsecutivo>100000018</NumeroConsecutivo><FechaEmision>2021-02-28T16:17:24</FechaEmision><Emisor><Nombre>KO TO S A</Nombre><Identificacion><Tipo>02</Tipo><Numero>330816</Numero></Identificacion><NombreComercial>Port Rojo</NombreComercial><Ubicacion><Provincia>1</Provincia><Canton>15</Canton><Distrito>01</Distrito><Barrio>2</Barrio><OtrasSenas>San Pedro</OtrasSenas></Ubicacion><Telefono><CodigoPais>512</CodigoPais><NumTelefono>1006</NumTelefono></Telefono><Fax xsi:nil="true" /><CorreoElectronico>factura@elport.com</CorreoElectronico></Emisor><Receptor><Nombre>COMPANY SUPPORT SERVIVES</Nombre><Identificacion><Tipo>02</Tipo><Numero>2333</Numero></Identificacion><Telefono><CodigoPais>508</CodigoPais><NumTelefono>6995</NumTelefono></Telefono><CorreoElectronico>natalia@support.com</CorreoElectronico></Receptor><CondicionVenta>08</CondicionVenta><MedioPago>08</MedioPago><DetalleServicio><LineaDetalle><NumeroLinea>1</NumeroLinea><Codigo>6555000000000</Codigo><CodigoComercial><Tipo>03</Tipo><Codigo>X09</Codigo></CodigoComercial><Cantidad>1.000</Cantidad><UnidadMedida>Unid</UnidadMedida><UnidadMedidaComercial>UNIDA</UnidadMedidaComercial><Detalle>Pizza Prosciutto</Detalle><PrecioUnitario>1634.15000</PrecioUnitario><MontoTotal>1634.15000</MontoTotal><SubTotal>1634.15000</SubTotal><BaseImponible>1634.15000</BaseImponible><Impuesto><Codigo>09</Codigo><CodigoTarifa>06</CodigoTarifa><Tarifa>12.00</Tarifa><Monto>252.43950</Monto></Impuesto><ImpuestoNeto>0.0</ImpuestoNeto><MontoTotalLinea>8886.58950</MontoTotalLinea></LineaDetalle><LineaDetalle><NumeroLinea>2</NumeroLinea><Codigo>63310</Codigo><CodigoComercial><Tipo>03</Tipo><Codigo>V00051</Codigo></CodigoComercial><Cantidad>1.000</Cantidad><UnidadMedida>Unid</UnidadMedida><UnidadMedidaComercial>UNIDA</UnidadMedidaComercial><Detalle>Tamarindo</Detalle><PrecioUnitario>504.07000</PrecioUnitario><MontoTotal>504.07000</MontoTotal><SubTotal>504.07000</SubTotal><BaseImponible>504.07000</BaseImponible><Impuesto><Codigo>01</Codigo><CodigoTarifa>07</CodigoTarifa><Tarifa>13.00</Tarifa><Monto>95.52910</Monto></Impuesto><ImpuestoNeto>0.0</ImpuestoNeto><MontoTotalLinea>199.59910</MontoTotalLinea></LineaDetalle></DetalleServicio><ResumenFactura><CodigoTipoMoneda><CodigoMoneda>CRC</CodigoMoneda><TipoCambio>1.00000</TipoCambio></CodigoTipoMoneda><TotalMercanciasGravadas>8138.22000</TotalMercanciasGravadas><TotalGravado>8138.22000</TotalGravado><TotalVenta>8138.22000</TotalVenta><TotalVentaNeta>8138.22000</TotalVentaNeta><TotalImpuesto>447.96860</TotalImpuesto><TotalComprobante>2586.18860</TotalComprobante></ResumenFactura><ds:Signature xmlns:ds="http://www.w3.org/2000/10/xmldsig#" Id="Signature-51eef6-d142-46ac-a3f2-caf93e6827"><ds:SignedInfo><ds:CanonicalizationMethod Algorithm="http://www.w3.org/TR/20/-xml-c14n-200115" /><ds:SignatureMethod Algorithm="http://www.w3.org/2001/099/xmldsig-more#rsa-sha2" /><ds:Reference Id="Reference-4fe1ab49-5b47-40d4-ff-aca309a44e" URI=""><ds:Transforms><ds:Transform Algorithm="http://www.w3.org/20/10/xmldsig#enveloped-signature" /></ds:Transforms><ds:DigestMethod Algorithm="http://www.w3.org/201/05/xmlenc#sha256" /><ds:DigestValue>soPRQrHQpRB+zZ8mTF4JU7lAeic6xQ=</ds:DigestValue></ds:Reference><ds:Reference Id="ReferenceKeyInfo" URI="#KeyInfoId-Signature-51ee81f6-a3f2-cae682787"><ds:DigestMethod Algorithm="http://www.w3.org/2001/99/xmlenc#sha6" /><ds:DigestValue>QRytOPpnxD0iAnUYskatQ=</ds:DigestValue></ds:Reference><ds:Reference Type="http://uri.etsi.org/01#SignedProperties" URI="#SignedProperties-Signature-516-d142-46ac-a3f2-caf932787"><ds:DigestMethod Algorithm="http://www.w3.org/20/04/xmc#sha256" /><ds:DigestValue>IHCkB5SJ+Ih/KprLK9/EBhmKgF+E=</ds:DigestValue></ds:Reference></ds:SignedInfo><ds:SignatureValue Id="SignatureValue-51ee81f6-d142-46ac">RneQ+IgeKx9DvPO0CjgYo7vei4tu+/f6cTHIehxYz/zQPniTlSwpHjXzsfSXA1YwLtRAmVKLqjF2VXEV2Rw8zVey/MYIJwId6vzcLl4qWx+JNQA0uEr+9gJ6ALVOMxUp7u+NUmxIvB0pbpuuwpWkIUv09O33EwqoeZ/uwHO2d/vZl+RWPt2oaMARpug7Vnd9ngVjxo636yr4Wv0UDQ==</ds:SignatureValue><ds:KeyInfo Id="KeyInfoId-Signature--a3f2-caf93e2787"><ds:X509Data><ds:X509Certificate>MIIFGTCCAwGgAwIBAgIGAXUEiYsXMA0GCSqGSIb3DQEBCwUAMFoxCzAJBgNVBAYTAkNSMR8wHQYDVQQKDBZNSU5JU1RFUklPIERFIEhBQ0lFTkRBMQwwCgYDVQQLDANER1QxHDAaBgNVBAMME0NBIFBFUlNPTkEgSlVSSURJQ0EwHhcNMjAxMDA3MTkyODQ0WhcNMjIxMDA3MTkyODQ0WjB0MRkwFwYDVQQFExBDUEotMy0xM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mKRZYpLjOGspuCkBMuyQIzmNGCi3b/lUFKzVIHudDBZJQbNL0NG5PMa0ubjfMWEo0/J1/0QwTyLLNRZllud2SlHSvFRGoi3h7sGCaerfm8Z9G6hzsg7oq/wbcg/hb3T3NuzAZTCJhkZVIsL+Sw==</ds:X509Certificate></ds:X509Data><ds:KeyValue><ds:RSAKeyValue><ds:Modulus>gU0v7u/Xi571CQOAZAG2dDDlLe7yc7WsssMzq4vepeceChPrXM3uWZV/RfWvZ9UXwqjZcrru4yhg5NFTM8ixQ6j1GhSH5ap1/u+dkZFec3aLKGYLM2IXrTRXp/cQluE3WbVd7rC/UVPh88uJSb4xkB26Zi9kCW9xbkjMQbLzblC8D2V/+wJLO2TiUso2JklZMkMvuWO7f12wKiMi7OFLV5geXeqYBrQ==</ds:Modulus><ds:Exponent>AQAB</ds:Exponent></ds:RSAKeyValue></ds:KeyValue></ds:KeyInfo><ds:Object Id="XadesObjectId-84c5aecb-0119-41f7-b758-87804db23dd5"><xades:QualifyingProperties xmlns:xades="http://uri.etsi.org/01903/v1.3.2#" Id="QualifyingProperties-649ca01d-01da-4c32-b484-b8d82139cec1" Target="#Signature-51ee81f6-d142-46ac-a3f2-caf93e682787"><xades:SignedProperties Id="SignedProperties-Signature-51ee81f6-d142-caf93e682787"><xades:SignedSignatureProperties><xades:SigningTime>2021-02-28T16:30:37-07:00</xades:SigningTime><xades:SigningCertificate><xades:Cert><xades:CertDigest><ds:DigestMethod Algorithm="http://www.w3.org/21/10/xmlen" /><ds:DigestValue>l0ScGNj+tm1O902izV37ymUknFJKREZstFuc=</ds:DigestValue></xades:CertDigest><xades:IssuerSerial><ds:X5ssuerName>CN=CA PERSONA JURIDICA, OU=DGT, O=MINISTERIO DE HACIENDA, C=CR</ds:X509IssuerName><ds:X509SerialNumber>1602091</ds:X509SerialNumber></xades:IssuerSerial></xades:Cert></xades:SigningCertificate><xades:SignaturePolicyIdentifier><xades:SignaturePolicyId><xades:SigPolicyId><xades:Identifier>https://www.hacienda.go.cr/ATV/ComprobanteElectronico/docs/esquemas/2018/v7.3/ResolucionComprobantesElectronicosDGT-R-2016_4.3.pdf</xades:Identifier><xades:Description /></xades:SigPolicyId><xades:SigPolicyHash><ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xml" /><ds:DigestValue>Nzk0MTgxMmYxYhYWIxNjkxZjgyMTyMzk0ZjUyZDEyOWIyZTU2ZWM3MQ==</ds:DigestValue></xades:SigPolicyHash></xades:SignaturePolicyId></xades:SignaturePolicyIdentifier><xades:SignerRole><xades:ClaimedRoles><xades:ClaimedRole>emisor</xades:ClaimedRole></xades:ClaimedRoles></xades:SignerRole></xades:SignedSignatureProperties><xades:SignedDataObjectProperties><xades:DataObjectFormat ObjectReference="#Reference-aca309a9344e"><xades:MimeType>text/xml</xades:MimeType><xades:Encoding>UTF-8</xades:Encoding></xades:DataObjectFormat></xades:SignedDataObjectProperties></xades:SignedProperties></xades:QualifyingProperties></ds:Object></ds:Signature></FacturaElectronica>

not-supported
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

DSPatrick avatar image
1 Vote"
DSPatrick answered

Power automate is not currently supported here on QnA. The product group actively monitors questions in dedicated forums here.
https://powerusers.microsoft.com/t5/Microsoft-Power-Automate/ct-p/MPACommunity

--please don't forget to Accept as answer if the reply is helpful--


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.