Trying to read SOAP response

Posted by OctavioOlguin on 18-Dec-2017 12:45

Hi there!..

I've got this answer from a soap service.  It contains an example of Mexico's electronic bill.  I'm tryin to read the SelloCFD, UUID, RfcProvCertif, SelloSAT...  They are embedded in the inner Xml, and also as fields of the outer Xml...

<?xml version="1.0"?>

<tns:quick_stampResponse xmlns:senc="schemas.xmlsoap.org/.../" xmlns:wsdl="schemas.xmlsoap.org/.../" xmlns:tns="facturacion.finkok.com/stamp" xmlns:soap="schemas.xmlsoap.org/.../" xmlns:senv="schemas.xmlsoap.org/.../" xmlns:s0="apps.services.soap.core.views" xmlns:plink="schemas.xmlsoap.org/.../" xmlns:xs="www.w3.org/.../XMLSchema" xmlns:s12enc="www.w3.org/.../" xmlns:xsi="www.w3.org/.../XMLSchema-instance" xmlns:xop="www.w3.org/.../include" xmlns:wsa="schemas.xmlsoap.org/.../addressing" xmlns:s12env="www.w3.org/.../">

<tns:quick_stampResult>

<s0:xml><?xml version="1.0" encoding="utf-8"?> <cfdi:Comprobante xmlns:cfdi="http://www.sat.gob.mx/cfd/3" xmlns:xsi="www.w3.org/.../XMLSchema-instance" Version="3.3" xsi:schemaLocation="http://www.sat.gob.mx/cfd/3 www.sat.gob.mx/.../cfdv33.xsd" Serie="A" Folio="50" Fecha="2017-12-18T12:34:19" Sello="W51oPVQU6Exh2yad6MxcFKrQ+qStzspxRnc9L8CL6I5ptSf8qU7bKaVaeQeDcwBMEYbxN6FnzOrkJ+OJ/w2dtQvON391Xfr2p2iUuLbHLoSvh4bxfLOHEdxEpie5PDbkoMJicc1IZk38zUyTEGfZM331nQOv3MNoYT0BX7MoNJhCFM5jrLiOIOQ7tqscCgw4wZXSPt34oP6hIB/DdLQz9HNsftSJ+r19iH2tLEqT6Ga8KPcWqnKE+4idFRt6bt6VrdW+wATX7aRGn8ZLmAFhcG6V0Z9mou7JLCQHNH9xG8P3guG9kqOsDZvd5MplDaFIDLdVG4QZ1QQerktsvYFfmw==" NoCertificado="20001000000300022815" Certificado="MIIFxTCCA62gAwIBAgIUMjAwMDEwMDAwMDAzMDAwMjI4MTUwDQYJKoZIhvcNAQELBQAwggFmMSAwHgYDVQQDDBdBLkMuIDIgZGUgcHJ1ZWJhcyg0MDk2KTEvMC0GA1UECgwmU2VydmljaW8gZGUgQWRtaW5pc3RyYWNpw7NuIFRyaWJ1dGFyaWExODA2BgNVBAsML0FkbWluaXN0cmFjacOzbiBkZSBTZWd1cmlkYWQgZGUgbGEgSW5mb3JtYWNpw7NuMSkwJwYJKoZIhvcNAQkBFhphc2lzbmV0QHBydWViYXMuc2F0LmdvYi5teDEmMCQGA1UECQwdQXYuIEhpZGFsZ28gNzcsIENvbC4gR3VlcnJlcm8xDjAMBgNVBBEMBTA2MzAwMQswCQYDVQQGEwJNWDEZMBcGA1UECAwQRGlzdHJpdG8gRmVkZXJhbDESMBAGA1UEBwwJQ295b2Fjw6FuMRUwEwYDVQQtEwxTQVQ5NzA3MDFOTjMxITAfBgkqhkiG9w0BCQIMElJlc3BvbnNhYmxlOiBBQ0RNQTAeFw0xNjEwMjUyMTUyMTFaFw0yMDEwMjUyMTUyMTFaMIGxMRowGAYDVQQDExFDSU5ERU1FWCBTQSBERSBDVjEaMBgGA1UEKRMRQ0lOREVNRVggU0EgREUgQ1YxGjAYBgNVBAoTEUNJTkRFTUVYIFNBIERFIENWMSUwIwYDVQQtExxMQU43MDA4MTczUjUgLyBGVUFCNzcwMTE3QlhBMR4wHAYDVQQFExUgLyBGVUFCNzcwMTE3TURGUk5OMDkxFDASBgNVBAsUC1BydWViYV9DRkRJMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAgvvCiCFDFVaYX7xdVRhp/38ULWto/LKDSZy1yrXKpaqFXqERJWF78YHKf3N5GBoXgzwFPuDX+5kvY5wtYNxx/Owu2shNZqFFh6EKsysQMeP5rz6kE1gFYenaPEUP9zj+h0bL3xR5aqoTsqGF24mKBLoiaK44pXBzGzgsxZishVJVM6XbzNJVonEUNbI25DhgWAd86f2aU3BmOH2K1RZx41dtTT56UsszJls4tPFODr/caWuZEuUvLp1M3nj7Dyu88mhD2f+1fA/g7kzcU/1tcpFXF/rIy93APvkU72jwvkrnprzs+SnG81+/F16ahuGsb2EZ88dKHwqxEkwzhMyTbQIDAQABox0wGzAMBgNVHRMBAf8EAjAAMAsGA1UdDwQEAwIGwDANBgkqhkiG9w0BAQsFAAOCAgEAJ/xkL8I+fpilZP+9aO8n93+20XxVomLJjeSL+Ng2ErL2GgatpLuN5JknFBkZAhxVIgMaTS23zzk1RLtRaYvH83lBH5E+M+kEjFGp14Fne1iV2Pm3vL4jeLmzHgY1Kf5HmeVrrp4PU7WQg16VpyHaJ/eonPNiEBUjcyQ1iFfkzJmnSJvDGtfQK2TiEolDJApYv0OWdm4is9Bsfi9j6lI9/T6MNZ+/LM2L/t72Vau4r7m94JDEzaO3A0wHAtQ97fjBfBiO5M8AEISAV7eZidIl3iaJJHkQbBYiiW2gikreUZKPUX0HmlnIqqQcBJhWKRu6Nqk6aZBTETLLpGrvF9OArV1JSsbdw/ZH+P88RAt5em5/gjwwtFlNHyiKG5w+UFpaZOK3gZP0su0sa6dlPeQ9EL4JlFkGqQCgSQ+NOsXqaOavgoP5VLykLwuGnwIUnuhBTVeDbzpgrg9LuF5dYp/zs+Y9ScJqe5VMAagLSYTShNtN8luV7LvxF9pgWwZdcM7lUwqJmUddCiZqdngg3vzTactMToG16gZA4CWnMgbU4E+r541+FNMpgAZNvs2CiW/eApfaaQojsZEAHDsDv4L5n3M1CC7fYjE/d61aSng1LaO6T1mh+dEfPvLzp7zyzz+UgWMhi5Cs4pcXx1eic5r7uxPoBwcCTt3YI1jKVVnV7/w=" FormaPago="01" CondicionesDePago="CONTADO" MetodoPago="PUE" SubTotal="470.00" Total="470.00" Moneda="MXN" TipoDeComprobante="I" LugarExpedicion="36760"><cfdi:Emisor Nombre="Pruebas" Rfc="LAN7008173R5" RegimenFiscal="601"/><cfdi:Receptor Nombre="SUCAHERSA S.A de C.V" Rfc="SCH000314GV5" UsoCFDI="G03"/><cfdi:Conceptos><cfdi:Concepto ValorUnitario="110.00" Descripcion="Pernil" Unidad="KGM" ClaveUnidad="KGM" Cantidad="3.00" ClaveProdServ="50111514" Importe="330.00"><cfdi:Impuestos><cfdi:Traslados><cfdi:Traslado Impuesto="002" TipoFactor="Tasa" Base="330.00" TasaOCuota="0.00" Importe="0.00"/></cfdi:Traslados></cfdi:Impuestos></cfdi:Concepto><cfdi:Concepto ValorUnitario="10.00" Descripcion="CHORIZO" Unidad="KGM" ClaveUnidad="KGM" Cantidad="2.00" ClaveProdServ="50111514" Importe="20.00"><cfdi:Impuestos><cfdi:Traslados><cfdi:Traslado Impuesto="002" TipoFactor="Tasa" Base="20.00" TasaOCuota="0.00" Importe="0.00"/></cfdi:Traslados></cfdi:Impuestos></cfdi:Concepto><cfdi:Concepto ValorUnitario="10.00" Descripcion="CODILLO" Unidad="KGM" ClaveUnidad="KGM" Cantidad="3.00" ClaveProdServ="50111514" Importe="30.00"><cfdi:Impuestos><cfdi:Traslados><cfdi:Traslado Impuesto="002" TipoFactor="Tasa" Base="30.00" TasaOCuota="0.00" Importe="0.00"/></cfdi:Traslados></cfdi:Impuestos></cfdi:Concepto><cfdi:Concepto ValorUnitario="10.00" Descripcion="NUGGET" Unidad="KGM" ClaveUnidad="KGM" Cantidad="4.00" ClaveProdServ="50111514" Importe="40.00"><cfdi:Impuestos><cfdi:Traslados><cfdi:Traslado Impuesto="002" TipoFactor="Tasa" Base="40.00" TasaOCuota="0.00" Importe="0.00"/></cfdi:Traslados></cfdi:Impuestos></cfdi:Concepto><cfdi:Concepto ValorUnitario="10.00" Descripcion="CHORIZO" Unidad="KGM" ClaveUnidad="KGM" Cantidad="5.00" ClaveProdServ="50111514" Importe="50.00"><cfdi:Impuestos><cfdi:Traslados><cfdi:Traslado Impuesto="002" TipoFactor="Tasa" Base="50.00" TasaOCuota="0.00" Importe="0.00"/></cfdi:Traslados></cfdi:Impuestos></cfdi:Concepto></cfdi:Conceptos><cfdi:Impuestos TotalImpuestosRetenidos="0.00" TotalImpuestosTrasladados="0.00"><cfdi:Traslados><cfdi:Traslado Importe="0.00" Impuesto="002" TipoFactor="Tasa" TasaOCuota="0.00"/></cfdi:Traslados></cfdi:Impuestos><cfdi:Complemento><tfd:TimbreFiscalDigital xmlns:tfd="www.sat.gob.mx/TimbreFiscalDigital" xsi:schemaLocation="www.sat.gob.mx/TimbreFiscalDigital www.sat.gob.mx/.../TimbreFiscalDigitalv11.xsd" Version="1.1" SelloCFD="W51oPVQU6Exh2yad6MxcFKrQ+qStzspxRnc9L8CL6I5ptSf8qU7bKaVaeQeDcwBMEYbxN6FnzOrkJ+OJ/w2dtQvON391Xfr2p2iUuLbHLoSvh4bxfLOHEdxEpie5PDbkoMJicc1IZk38zUyTEGfZM331nQOv3MNoYT0BX7MoNJhCFM5jrLiOIOQ7tqscCgw4wZXSPt34oP6hIB/DdLQz9HNsftSJ+r19iH2tLEqT6Ga8KPcWqnKE+4idFRt6bt6VrdW+wATX7aRGn8ZLmAFhcG6V0Z9mou7JLCQHNH9xG8P3guG9kqOsDZvd5MplDaFIDLdVG4QZ1QQerktsvYFfmw==" NoCertificadoSAT="20001000000300022323" RfcProvCertif="FIN1203015JA" UUID="3A471502-9A27-4270-9ABD-1AD0E4E329A2" FechaTimbrado="2017-12-18T12:34:23" SelloSAT="CGgP/Dsak8xNtsW9klZ0mTICLcNtH3UzZqo3RHQvXh9uLRtjWcVQWptJV07q76fF6kBeFAHYzNOFL+kGiFiObDgnztWBlSxsgh5OpX+dDmGiQHru6FgOea7H6tCNSY+5za0vuNFZwBEiG12Abp4mdKLrIj+GSNkKu1g5c9Jf6DhBEofMeVmlhiHPK5VbwvV+XsP6PoTRhvhEmqOKsZTAzD+/NY+F1z+1CPERozDyIZZrKtdaha7xj3kjsMIoZ2NOWozFiWr6ummazCYnLWy0tbq0HDJocIWUuwm9otcLah2Puh4uNfeS151IkuyGZkWmEs0irZDLbdUI2D9ko58q9Q=="/></cfdi:Complemento></cfdi:Comprobante></s0:xml>

<s0:UUID>3A471502-9A27-4270-9ABD-1AD0E4E329A2</s0:UUID>

<s0:Fecha>2017-12-18T12:34:23</s0:Fecha>

<s0:CodEstatus>Comprobante timbrado satisfactoriamente</s0:CodEstatus>

<s0:SatSeal>CGgP/Dsak8xNtsW9klZ0mTICLcNtH3UzZqo3RHQvXh9uLRtjWcVQWptJV07q76fF6kBeFAHYzNOFL+kGiFiObDgnztWBlSxsgh5OpX+dDmGiQHru6FgOea7H6tCNSY+5za0vuNFZwBEiG12Abp4mdKLrIj+GSNkKu1g5c9Jf6DhBEofMeVmlhiHPK5VbwvV+XsP6PoTRhvhEmqOKsZTAzD+/NY+F1z+1CPERozDyIZZrKtdaha7xj3kjsMIoZ2NOWozFiWr6ummazCYnLWy0tbq0HDJocIWUuwm9otcLah2Puh4uNfeS151IkuyGZkWmEs0irZDLbdUI2D9ko58q9Q==</s0:SatSeal>

<s0:Incidencias/>

<s0:NoCertificadoSAT>20001000000300022323</s0:NoCertificadoSAT>

</tns:quick_stampResult>

</tns:quick_stampResponse>

I guess that if can fit the inner xml in one field, I can put that field to a file and do a DATASET x:READ-XML, as for that structure I do have a xsd file that defines it..

My problem comes from the first XML I got as response to the webservice call...

How could I read this structure?

Thanks.

Posted by OctavioOlguin on 19-Dec-2017 13:17

Done!.

It happens that we have very clever people amoong us.

(Scott Augé being one of them)

/**************************************************************************/
/*                                                                        */
/*           .-.------------------------------------------.-.             */
/*          ((o))                                            )            */
/*           \U/_______          _____         ______   ____/             */
/*             |                                           |              */
/*             |         #####    #####  ######            |              */
/*             |         #     # #     # #     #           |              */
/*             |         #     # #       #     #           |              */
/*             |         ######   #####  #     #           |              */
/*             |         #     #       # #     #           |              */
/*             |         #     # #     # #     #           |              */
/*             |         ######   #####  ######            |              */
/*             |                                           |              */
/*             |                                           |              */
/*             |                                           |              */
/*             |____    _______    __  ____    _   ___   __|KCK/SGA       */
/*            /A\                                           \             */
/*           ((o))                                           )            */
/*            '-'-------------------------------------------'             */
/*                                                                        */
/*                                                                        */
/* Copyright 2017, Amduus Information Works, Inc., Scott Auge             */
/* All rights reserved.                                                   */
/* http://www/amduus.com   sauge@amduus.com                               */
/*                                                                        */
/* Redistribution and use in source and binary forms, with or without     */
/* modification, are permitted provided that the following conditions are */
/* met:                                                                   */
/*                                                                        */
/*   - Redistributions of source code must retain the above copyright     */
/*     notice, this list of conditions and the following disclaimer.      */
/*   - Redistributions in binary form must reproduce the above copyright  */
/*     notice, this list of conditions and the following disclaimer in    */
/*     the documentation and/or other materials provided with the         */
/*     distribution.                                                      */
/*   - Neither the name of the Amduus Information Works, Inc. nor the     */
/*     names of its contributors may be used to endorse or promote        */
/*     products derived from this software without specific prior written */
/*     permission.                                                        */
/*                                                                        */
/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS    */
/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT      */
/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR  */
/* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT   */
/* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT       */
/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,  */
/* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY  */
/* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT    */
/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE  */
/* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.   */
/*                                                                        */
/**************************************************************************/
/* Purpose: The xpathparse class.                                         */
/**************************************************************************/

USING auxiliar.yaxmlparser.xpathparse FROM PROPATH.

DEFINE VARIABLE a AS xpathparse NO-UNDO.

a = NEW xpathparse ("D:\temp\resultado.xml").

a:DumpToFile("d:\temp/Data.d").

OUTPUT TO "D:\temp\xmltimbrado.xml".
PUT UNFORMATTED STRING(a:FindByXPathAsLongChar ("/tns:quick_stampResponse/tns:quick_stampResult/s0:xml")).

MESSAGE "FindByXPath (uuid): " a:FindByXPath ("/tns:quick_stampResponse/tns:quick_stampResult/s0:UUID")
  VIEW-AS ALERT-BOX.

MESSAGE "FindByXPath (fecha): " a:FindByXPath ("/tns:quick_stampResponse/tns:quick_stampResult/s0:fecha")
    VIEW-AS ALERT-BOX.

MESSAGE "FindByXPath (SatSeal): " a:FindByXPath ("/tns:quick_stampResponse/tns:quick_stampResult/s0:SatSeal")
    VIEW-AS ALERT-BOX.

MESSAGE "FindByXPath (NoCertificadoSAT): " a:FindByXPath ("/tns:quick_stampResponse/tns:quick_stampResult/s0:NoCertificadoSAT")
    VIEW-AS ALERT-BOX.


DELETE OBJECT a.

Check his great contribution.

Thanks  Scott.

Posted by OctavioOlguin on 19-Dec-2017 13:20

Done!.

It happens that we have very clever people amoong us.

(Scott Augé being one of them)

/**************************************************************************/
/*                                                                        */
/*           .-.------------------------------------------.-.             */
/*          ((o))                                            )            */
/*           \U/_______          _____         ______   ____/             */
/*             |                                           |              */
/*             |         #####    #####  ######            |              */
/*             |         #     # #     # #     #           |              */
/*             |         #     # #       #     #           |              */
/*             |         ######   #####  #     #           |              */
/*             |         #     #       # #     #           |              */
/*             |         #     # #     # #     #           |              */
/*             |         ######   #####  ######            |              */
/*             |                                           |              */
/*             |                                           |              */
/*             |                                           |              */
/*             |____    _______    __  ____    _   ___   __|KCK/SGA       */
/*            /A\                                           \             */
/*           ((o))                                           )            */
/*            '-'-------------------------------------------'             */
/*                                                                        */
/*                                                                        */
/* Copyright 2017, Amduus Information Works, Inc., Scott Auge             */
/* All rights reserved.                                                   */
/* http://www/amduus.com   sauge@amduus.com                               */
/*                                                                        */
/* Redistribution and use in source and binary forms, with or without     */
/* modification, are permitted provided that the following conditions are */
/* met:                                                                   */
/*                                                                        */
/*   - Redistributions of source code must retain the above copyright     */
/*     notice, this list of conditions and the following disclaimer.      */
/*   - Redistributions in binary form must reproduce the above copyright  */
/*     notice, this list of conditions and the following disclaimer in    */
/*     the documentation and/or other materials provided with the         */
/*     distribution.                                                      */
/*   - Neither the name of the Amduus Information Works, Inc. nor the     */
/*     names of its contributors may be used to endorse or promote        */
/*     products derived from this software without specific prior written */
/*     permission.                                                        */
/*                                                                        */
/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS    */
/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT      */
/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR  */
/* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT   */
/* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT       */
/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,  */
/* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY  */
/* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT    */
/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE  */
/* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.   */
/*                                                                        */
/**************************************************************************/
/* Purpose: The xpathparse class.                                         */
/**************************************************************************/

USING auxiliar.yaxmlparser.xpathparse FROM PROPATH.

DEFINE VARIABLE a AS xpathparse NO-UNDO.

a = NEW xpathparse ("D:\temp\resultado.xml").

a:DumpToFile("d:\temp/Data.d").

OUTPUT TO "D:\temp\xmltimbrado.xml".
PUT UNFORMATTED STRING(a:FindByXPathAsLongChar ("/tns:quick_stampResponse/tns:quick_stampResult/s0:xml")).

MESSAGE "FindByXPath (uuid): " a:FindByXPath ("/tns:quick_stampResponse/tns:quick_stampResult/s0:UUID")
  VIEW-AS ALERT-BOX.

MESSAGE "FindByXPath (fecha): " a:FindByXPath ("/tns:quick_stampResponse/tns:quick_stampResult/s0:fecha")
    VIEW-AS ALERT-BOX.

MESSAGE "FindByXPath (SatSeal): " a:FindByXPath ("/tns:quick_stampResponse/tns:quick_stampResult/s0:SatSeal")
    VIEW-AS ALERT-BOX.

MESSAGE "FindByXPath (NoCertificadoSAT): " a:FindByXPath ("/tns:quick_stampResponse/tns:quick_stampResult/s0:NoCertificadoSAT")
    VIEW-AS ALERT-BOX.


DELETE OBJECT a.


Check his great contribution.

Thanks  Scott.

Posted by OctavioOlguin on 19-Dec-2017 13:22

/**************************************************************************/

/*                                                                        */

/*           .-.------------------------------------------.-.             */

/*          ((o))                                            )            */

/*           \U/_______          _____         ______   ____/             */

/*             |                                           |              */

/*             |         #####    #####  ######            |              */

/*             |         #     # #     # #     #           |              */

/*             |         #     # #       #     #           |              */

/*             |         ######   #####  #     #           |              */

/*             |         #     #       # #     #           |              */

/*             |         #     # #     # #     #           |              */

/*             |         ######   #####  ######            |              */

/*             |                                           |              */

/*             |                                           |              */

/*             |                                           |              */

/*             |____    _______    __  ____    _   ___   __|KCK/SGA       */

/*            /A\                                           \             */

/*           ((o))                                           )            */

/*            '-'-------------------------------------------'             */

/*                                                                        */

/*                                                                        */

/* Copyright 2017, Amduus Information Works, Inc., Scott Auge             */

/* All rights reserved.                                                   */

/* http://www/amduus.com   sauge@amduus.com                               */

/*                                                                        */

/* Redistribution and use in source and binary forms, with or without     */

/* modification, are permitted provided that the following conditions are */

/* met:                                                                   */

/*                                                                        */

/*   - Redistributions of source code must retain the above copyright     */

/*     notice, this list of conditions and the following disclaimer.      */

/*   - Redistributions in binary form must reproduce the above copyright  */

/*     notice, this list of conditions and the following disclaimer in    */

/*     the documentation and/or other materials provided with the         */

/*     distribution.                                                      */

/*   - Neither the name of the Amduus Information Works, Inc. nor the     */

/*     names of its contributors may be used to endorse or promote        */

/*     products derived from this software without specific prior written */

/*     permission.                                                        */

/*                                                                        */

/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS    */

/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT      */

/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR  */

/* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT   */

/* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */

/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT       */

/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,  */

/* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY  */

/* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT    */

/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE  */

/* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.   */

/*                                                                        */

/**************************************************************************/

/* Purpose: The xpathparse class.                                         */

/**************************************************************************/

USING auxiliar.yaxmlparser.xpathparse FROM PROPATH.

DEFINE VARIABLE a AS xpathparse NO-UNDO.

a = NEW xpathparse ("D:\temp\resultado.xml").

a:DumpToFile("d:\temp/Data.d").

OUTPUT TO "D:\temp\xmltimbrado.xml".

PUT UNFORMATTED STRING(a:FindByXPathAsLongChar ("/tns:quick_stampResponse/tns:quick_stampResult/s0:xml")).

MESSAGE "FindByXPath (uuid): " a:FindByXPath ("/tns:quick_stampResponse/tns:quick_stampResult/s0:UUID")

 VIEW-AS ALERT-BOX.

MESSAGE "FindByXPath (fecha): " a:FindByXPath ("/tns:quick_stampResponse/tns:quick_stampResult/s0:fecha")

   VIEW-AS ALERT-BOX.

MESSAGE "FindByXPath (SatSeal): " a:FindByXPath ("/tns:quick_stampResponse/tns:quick_stampResult/s0:SatSeal")

   VIEW-AS ALERT-BOX.

MESSAGE "FindByXPath (NoCertificadoSAT): " a:FindByXPath ("/tns:quick_stampResponse/tns:quick_stampResult/s0:NoCertificadoSAT")

   VIEW-AS ALERT-BOX.

DELETE OBJECT a.

Posted by OctavioOlguin on 19-Dec-2017 13:23

We hapen to have very clever people among us.

(Scott Augé being one of them)

Thanks Scott

Posted by OctavioOlguin on 19-Dec-2017 13:25

/**************************************************************************/
/*                                                                        */
/*           .-.------------------------------------------.-.             */
/*          ((o))                                            )            */
/*           \U/_______          _____         ______   ____/             */
/*             |                                           |              */
/*             |         #####    #####  ######            |              */
/*             |         #     # #     # #     #           |              */
/*             |         #     # #       #     #           |              */
/*             |         ######   #####  #     #           |              */
/*             |         #     #       # #     #           |              */
/*             |         #     # #     # #     #           |              */
/*             |         ######   #####  ######            |              */
/*             |                                           |              */
/*             |                                           |              */
/*             |                                           |              */
/*             |____    _______    __  ____    _   ___   __|KCK/SGA       */
/*            /A\                                           \             */
/*           ((o))                                           )            */
/*            '-'-------------------------------------------'             */
/*                                                                        */
/*                                                                        */
/* Copyright 2017, Amduus Information Works, Inc., Scott Auge             */
/* All rights reserved.                                                   */
/* http://www/amduus.com   sauge@amduus.com                               */
/*                                                                        */
/* Redistribution and use in source and binary forms, with or without     */
/* modification, are permitted provided that the following conditions are */
/* met:                                                                   */
/*                                                                        */
/*   - Redistributions of source code must retain the above copyright     */
/*     notice, this list of conditions and the following disclaimer.      */
/*   - Redistributions in binary form must reproduce the above copyright  */
/*     notice, this list of conditions and the following disclaimer in    */
/*     the documentation and/or other materials provided with the         */
/*     distribution.                                                      */
/*   - Neither the name of the Amduus Information Works, Inc. nor the     */
/*     names of its contributors may be used to endorse or promote        */
/*     products derived from this software without specific prior written */
/*     permission.                                                        */
/*                                                                        */
/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS    */
/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT      */
/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR  */
/* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT   */
/* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT       */
/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,  */
/* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY  */
/* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT    */
/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE  */
/* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.   */
/*                                                                        */
/**************************************************************************/
/* Purpose: The xpathparse class.                                         */
/**************************************************************************/

USING auxiliar.yaxmlparser.xpathparse FROM PROPATH.

DEFINE VARIABLE a AS xpathparse NO-UNDO.

a = NEW xpathparse ("D:\temp\resultado.xml").

a:DumpToFile("d:\temp/Data.d").

OUTPUT TO "D:\temp\xmltimbrado.xml".
PUT UNFORMATTED STRING(a:FindByXPathAsLongChar ("/tns:quick_stampResponse/tns:quick_stampResult/s0:xml")).

MESSAGE "FindByXPath (uuid): " a:FindByXPath ("/tns:quick_stampResponse/tns:quick_stampResult/s0:UUID")
  VIEW-AS ALERT-BOX.

MESSAGE "FindByXPath (fecha): " a:FindByXPath ("/tns:quick_stampResponse/tns:quick_stampResult/s0:fecha")
    VIEW-AS ALERT-BOX.

MESSAGE "FindByXPath (SatSeal): " a:FindByXPath ("/tns:quick_stampResponse/tns:quick_stampResult/s0:SatSeal")
    VIEW-AS ALERT-BOX.

MESSAGE "FindByXPath (NoCertificadoSAT): " a:FindByXPath ("/tns:quick_stampResponse/tns:quick_stampResult/s0:NoCertificadoSAT")
    VIEW-AS ALERT-BOX.


DELETE OBJECT a.


We happen to have very clever people among us.
Scott Augé being one of them

Thanks Scott

Posted by OctavioOlguin on 21-Dec-2017 07:23

/**************************************************************************/
/*                                                                        */
/*           .-.------------------------------------------.-.             */
/*          ((o))                                            )            */
/*           \U/_______          _____         ______   ____/             */
/*             |                                           |              */
/*             |         #####    #####  ######            |              */
/*             |         #     # #     # #     #           |              */
/*             |         #     # #       #     #           |              */
/*             |         ######   #####  #     #           |              */
/*             |         #     #       # #     #           |              */
/*             |         #     # #     # #     #           |              */
/*             |         ######   #####  ######            |              */
/*             |                                           |              */
/*             |                                           |              */
/*             |                                           |              */
/*             |____    _______    __  ____    _   ___   __|KCK/SGA       */
/*            /A\                                           \             */
/*           ((o))                                           )            */
/*            '-'-------------------------------------------'             */
/*                                                                        */
/*                                                                        */
/* Copyright 2017, Amduus Information Works, Inc., Scott Auge             */
/* All rights reserved.                                                   */
/* http://www/amduus.com   sauge@amduus.com                               */
/*                                                                        */
/**************************************************************************/
/* Purpose: The xpathparse class.                                         */
/**************************************************************************/

USING auxiliar.yaxmlparser.xpathparse FROM PROPATH.

DEFINE VARIABLE a AS xpathparse NO-UNDO.

a = NEW xpathparse ("D:\temp\resultado.xml").

a:DumpToFile("d:\temp/Data.d").

OUTPUT TO "D:\temp\xmltimbrado.xml".
PUT UNFORMATTED STRING(a:FindByXPathAsLongChar ("/tns:quick_stampResponse/tns:quick_stampResult/s0:xml")).

MESSAGE a:FindByXPathAsLongChar ("/tns:quick_stampResponse/tns:quick_stampResult/s0:CodEstatus")
    VIEW-AS ALERT-BOX INFORMATION BUTTONS OK.

MESSAGE "FindByXPath (uuid): " a:FindByXPath ("/tns:quick_stampResponse/tns:quick_stampResult/s0:UUID")
  VIEW-AS ALERT-BOX.

MESSAGE "FindByXPath (fecha): " a:FindByXPath ("/tns:quick_stampResponse/tns:quick_stampResult/s0:fecha")
    VIEW-AS ALERT-BOX.

MESSAGE "FindByXPath (SatSeal): " a:FindByXPath ("/tns:quick_stampResponse/tns:quick_stampResult/s0:SatSeal")
    VIEW-AS ALERT-BOX.

MESSAGE "FindByXPath (NoCertificadoSAT): " a:FindByXPath ("/tns:quick_stampResponse/tns:quick_stampResult/s0:NoCertificadoSAT")
    VIEW-AS ALERT-BOX.


DELETE OBJECT a.

Done!.

It happens that there are very clever people among us.

Scott Augé being one of them

All Replies

Posted by OctavioOlguin on 19-Dec-2017 13:17

Done!.

It happens that we have very clever people amoong us.

(Scott Augé being one of them)

/**************************************************************************/
/*                                                                        */
/*           .-.------------------------------------------.-.             */
/*          ((o))                                            )            */
/*           \U/_______          _____         ______   ____/             */
/*             |                                           |              */
/*             |         #####    #####  ######            |              */
/*             |         #     # #     # #     #           |              */
/*             |         #     # #       #     #           |              */
/*             |         ######   #####  #     #           |              */
/*             |         #     #       # #     #           |              */
/*             |         #     # #     # #     #           |              */
/*             |         ######   #####  ######            |              */
/*             |                                           |              */
/*             |                                           |              */
/*             |                                           |              */
/*             |____    _______    __  ____    _   ___   __|KCK/SGA       */
/*            /A\                                           \             */
/*           ((o))                                           )            */
/*            '-'-------------------------------------------'             */
/*                                                                        */
/*                                                                        */
/* Copyright 2017, Amduus Information Works, Inc., Scott Auge             */
/* All rights reserved.                                                   */
/* http://www/amduus.com   sauge@amduus.com                               */
/*                                                                        */
/* Redistribution and use in source and binary forms, with or without     */
/* modification, are permitted provided that the following conditions are */
/* met:                                                                   */
/*                                                                        */
/*   - Redistributions of source code must retain the above copyright     */
/*     notice, this list of conditions and the following disclaimer.      */
/*   - Redistributions in binary form must reproduce the above copyright  */
/*     notice, this list of conditions and the following disclaimer in    */
/*     the documentation and/or other materials provided with the         */
/*     distribution.                                                      */
/*   - Neither the name of the Amduus Information Works, Inc. nor the     */
/*     names of its contributors may be used to endorse or promote        */
/*     products derived from this software without specific prior written */
/*     permission.                                                        */
/*                                                                        */
/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS    */
/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT      */
/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR  */
/* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT   */
/* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT       */
/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,  */
/* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY  */
/* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT    */
/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE  */
/* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.   */
/*                                                                        */
/**************************************************************************/
/* Purpose: The xpathparse class.                                         */
/**************************************************************************/

USING auxiliar.yaxmlparser.xpathparse FROM PROPATH.

DEFINE VARIABLE a AS xpathparse NO-UNDO.

a = NEW xpathparse ("D:\temp\resultado.xml").

a:DumpToFile("d:\temp/Data.d").

OUTPUT TO "D:\temp\xmltimbrado.xml".
PUT UNFORMATTED STRING(a:FindByXPathAsLongChar ("/tns:quick_stampResponse/tns:quick_stampResult/s0:xml")).

MESSAGE "FindByXPath (uuid): " a:FindByXPath ("/tns:quick_stampResponse/tns:quick_stampResult/s0:UUID")
  VIEW-AS ALERT-BOX.

MESSAGE "FindByXPath (fecha): " a:FindByXPath ("/tns:quick_stampResponse/tns:quick_stampResult/s0:fecha")
    VIEW-AS ALERT-BOX.

MESSAGE "FindByXPath (SatSeal): " a:FindByXPath ("/tns:quick_stampResponse/tns:quick_stampResult/s0:SatSeal")
    VIEW-AS ALERT-BOX.

MESSAGE "FindByXPath (NoCertificadoSAT): " a:FindByXPath ("/tns:quick_stampResponse/tns:quick_stampResult/s0:NoCertificadoSAT")
    VIEW-AS ALERT-BOX.


DELETE OBJECT a.

Check his great contribution.

Thanks  Scott.

Posted by OctavioOlguin on 19-Dec-2017 13:20

Done!.

It happens that we have very clever people amoong us.

(Scott Augé being one of them)

/**************************************************************************/
/*                                                                        */
/*           .-.------------------------------------------.-.             */
/*          ((o))                                            )            */
/*           \U/_______          _____         ______   ____/             */
/*             |                                           |              */
/*             |         #####    #####  ######            |              */
/*             |         #     # #     # #     #           |              */
/*             |         #     # #       #     #           |              */
/*             |         ######   #####  #     #           |              */
/*             |         #     #       # #     #           |              */
/*             |         #     # #     # #     #           |              */
/*             |         ######   #####  ######            |              */
/*             |                                           |              */
/*             |                                           |              */
/*             |                                           |              */
/*             |____    _______    __  ____    _   ___   __|KCK/SGA       */
/*            /A\                                           \             */
/*           ((o))                                           )            */
/*            '-'-------------------------------------------'             */
/*                                                                        */
/*                                                                        */
/* Copyright 2017, Amduus Information Works, Inc., Scott Auge             */
/* All rights reserved.                                                   */
/* http://www/amduus.com   sauge@amduus.com                               */
/*                                                                        */
/* Redistribution and use in source and binary forms, with or without     */
/* modification, are permitted provided that the following conditions are */
/* met:                                                                   */
/*                                                                        */
/*   - Redistributions of source code must retain the above copyright     */
/*     notice, this list of conditions and the following disclaimer.      */
/*   - Redistributions in binary form must reproduce the above copyright  */
/*     notice, this list of conditions and the following disclaimer in    */
/*     the documentation and/or other materials provided with the         */
/*     distribution.                                                      */
/*   - Neither the name of the Amduus Information Works, Inc. nor the     */
/*     names of its contributors may be used to endorse or promote        */
/*     products derived from this software without specific prior written */
/*     permission.                                                        */
/*                                                                        */
/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS    */
/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT      */
/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR  */
/* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT   */
/* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT       */
/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,  */
/* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY  */
/* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT    */
/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE  */
/* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.   */
/*                                                                        */
/**************************************************************************/
/* Purpose: The xpathparse class.                                         */
/**************************************************************************/

USING auxiliar.yaxmlparser.xpathparse FROM PROPATH.

DEFINE VARIABLE a AS xpathparse NO-UNDO.

a = NEW xpathparse ("D:\temp\resultado.xml").

a:DumpToFile("d:\temp/Data.d").

OUTPUT TO "D:\temp\xmltimbrado.xml".
PUT UNFORMATTED STRING(a:FindByXPathAsLongChar ("/tns:quick_stampResponse/tns:quick_stampResult/s0:xml")).

MESSAGE "FindByXPath (uuid): " a:FindByXPath ("/tns:quick_stampResponse/tns:quick_stampResult/s0:UUID")
  VIEW-AS ALERT-BOX.

MESSAGE "FindByXPath (fecha): " a:FindByXPath ("/tns:quick_stampResponse/tns:quick_stampResult/s0:fecha")
    VIEW-AS ALERT-BOX.

MESSAGE "FindByXPath (SatSeal): " a:FindByXPath ("/tns:quick_stampResponse/tns:quick_stampResult/s0:SatSeal")
    VIEW-AS ALERT-BOX.

MESSAGE "FindByXPath (NoCertificadoSAT): " a:FindByXPath ("/tns:quick_stampResponse/tns:quick_stampResult/s0:NoCertificadoSAT")
    VIEW-AS ALERT-BOX.


DELETE OBJECT a.


Check his great contribution.

Thanks  Scott.

Posted by OctavioOlguin on 19-Dec-2017 13:22

/**************************************************************************/

/*                                                                        */

/*           .-.------------------------------------------.-.             */

/*          ((o))                                            )            */

/*           \U/_______          _____         ______   ____/             */

/*             |                                           |              */

/*             |         #####    #####  ######            |              */

/*             |         #     # #     # #     #           |              */

/*             |         #     # #       #     #           |              */

/*             |         ######   #####  #     #           |              */

/*             |         #     #       # #     #           |              */

/*             |         #     # #     # #     #           |              */

/*             |         ######   #####  ######            |              */

/*             |                                           |              */

/*             |                                           |              */

/*             |                                           |              */

/*             |____    _______    __  ____    _   ___   __|KCK/SGA       */

/*            /A\                                           \             */

/*           ((o))                                           )            */

/*            '-'-------------------------------------------'             */

/*                                                                        */

/*                                                                        */

/* Copyright 2017, Amduus Information Works, Inc., Scott Auge             */

/* All rights reserved.                                                   */

/* http://www/amduus.com   sauge@amduus.com                               */

/*                                                                        */

/* Redistribution and use in source and binary forms, with or without     */

/* modification, are permitted provided that the following conditions are */

/* met:                                                                   */

/*                                                                        */

/*   - Redistributions of source code must retain the above copyright     */

/*     notice, this list of conditions and the following disclaimer.      */

/*   - Redistributions in binary form must reproduce the above copyright  */

/*     notice, this list of conditions and the following disclaimer in    */

/*     the documentation and/or other materials provided with the         */

/*     distribution.                                                      */

/*   - Neither the name of the Amduus Information Works, Inc. nor the     */

/*     names of its contributors may be used to endorse or promote        */

/*     products derived from this software without specific prior written */

/*     permission.                                                        */

/*                                                                        */

/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS    */

/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT      */

/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR  */

/* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT   */

/* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */

/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT       */

/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,  */

/* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY  */

/* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT    */

/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE  */

/* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.   */

/*                                                                        */

/**************************************************************************/

/* Purpose: The xpathparse class.                                         */

/**************************************************************************/

USING auxiliar.yaxmlparser.xpathparse FROM PROPATH.

DEFINE VARIABLE a AS xpathparse NO-UNDO.

a = NEW xpathparse ("D:\temp\resultado.xml").

a:DumpToFile("d:\temp/Data.d").

OUTPUT TO "D:\temp\xmltimbrado.xml".

PUT UNFORMATTED STRING(a:FindByXPathAsLongChar ("/tns:quick_stampResponse/tns:quick_stampResult/s0:xml")).

MESSAGE "FindByXPath (uuid): " a:FindByXPath ("/tns:quick_stampResponse/tns:quick_stampResult/s0:UUID")

 VIEW-AS ALERT-BOX.

MESSAGE "FindByXPath (fecha): " a:FindByXPath ("/tns:quick_stampResponse/tns:quick_stampResult/s0:fecha")

   VIEW-AS ALERT-BOX.

MESSAGE "FindByXPath (SatSeal): " a:FindByXPath ("/tns:quick_stampResponse/tns:quick_stampResult/s0:SatSeal")

   VIEW-AS ALERT-BOX.

MESSAGE "FindByXPath (NoCertificadoSAT): " a:FindByXPath ("/tns:quick_stampResponse/tns:quick_stampResult/s0:NoCertificadoSAT")

   VIEW-AS ALERT-BOX.

DELETE OBJECT a.

Posted by OctavioOlguin on 19-Dec-2017 13:23

We hapen to have very clever people among us.

(Scott Augé being one of them)

Thanks Scott

Posted by OctavioOlguin on 19-Dec-2017 13:25

/**************************************************************************/
/*                                                                        */
/*           .-.------------------------------------------.-.             */
/*          ((o))                                            )            */
/*           \U/_______          _____         ______   ____/             */
/*             |                                           |              */
/*             |         #####    #####  ######            |              */
/*             |         #     # #     # #     #           |              */
/*             |         #     # #       #     #           |              */
/*             |         ######   #####  #     #           |              */
/*             |         #     #       # #     #           |              */
/*             |         #     # #     # #     #           |              */
/*             |         ######   #####  ######            |              */
/*             |                                           |              */
/*             |                                           |              */
/*             |                                           |              */
/*             |____    _______    __  ____    _   ___   __|KCK/SGA       */
/*            /A\                                           \             */
/*           ((o))                                           )            */
/*            '-'-------------------------------------------'             */
/*                                                                        */
/*                                                                        */
/* Copyright 2017, Amduus Information Works, Inc., Scott Auge             */
/* All rights reserved.                                                   */
/* http://www/amduus.com   sauge@amduus.com                               */
/*                                                                        */
/* Redistribution and use in source and binary forms, with or without     */
/* modification, are permitted provided that the following conditions are */
/* met:                                                                   */
/*                                                                        */
/*   - Redistributions of source code must retain the above copyright     */
/*     notice, this list of conditions and the following disclaimer.      */
/*   - Redistributions in binary form must reproduce the above copyright  */
/*     notice, this list of conditions and the following disclaimer in    */
/*     the documentation and/or other materials provided with the         */
/*     distribution.                                                      */
/*   - Neither the name of the Amduus Information Works, Inc. nor the     */
/*     names of its contributors may be used to endorse or promote        */
/*     products derived from this software without specific prior written */
/*     permission.                                                        */
/*                                                                        */
/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS    */
/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT      */
/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR  */
/* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT   */
/* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT       */
/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,  */
/* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY  */
/* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT    */
/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE  */
/* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.   */
/*                                                                        */
/**************************************************************************/
/* Purpose: The xpathparse class.                                         */
/**************************************************************************/

USING auxiliar.yaxmlparser.xpathparse FROM PROPATH.

DEFINE VARIABLE a AS xpathparse NO-UNDO.

a = NEW xpathparse ("D:\temp\resultado.xml").

a:DumpToFile("d:\temp/Data.d").

OUTPUT TO "D:\temp\xmltimbrado.xml".
PUT UNFORMATTED STRING(a:FindByXPathAsLongChar ("/tns:quick_stampResponse/tns:quick_stampResult/s0:xml")).

MESSAGE "FindByXPath (uuid): " a:FindByXPath ("/tns:quick_stampResponse/tns:quick_stampResult/s0:UUID")
  VIEW-AS ALERT-BOX.

MESSAGE "FindByXPath (fecha): " a:FindByXPath ("/tns:quick_stampResponse/tns:quick_stampResult/s0:fecha")
    VIEW-AS ALERT-BOX.

MESSAGE "FindByXPath (SatSeal): " a:FindByXPath ("/tns:quick_stampResponse/tns:quick_stampResult/s0:SatSeal")
    VIEW-AS ALERT-BOX.

MESSAGE "FindByXPath (NoCertificadoSAT): " a:FindByXPath ("/tns:quick_stampResponse/tns:quick_stampResult/s0:NoCertificadoSAT")
    VIEW-AS ALERT-BOX.


DELETE OBJECT a.


We happen to have very clever people among us.
Scott Augé being one of them

Thanks Scott

Posted by OctavioOlguin on 21-Dec-2017 07:23

/**************************************************************************/
/*                                                                        */
/*           .-.------------------------------------------.-.             */
/*          ((o))                                            )            */
/*           \U/_______          _____         ______   ____/             */
/*             |                                           |              */
/*             |         #####    #####  ######            |              */
/*             |         #     # #     # #     #           |              */
/*             |         #     # #       #     #           |              */
/*             |         ######   #####  #     #           |              */
/*             |         #     #       # #     #           |              */
/*             |         #     # #     # #     #           |              */
/*             |         ######   #####  ######            |              */
/*             |                                           |              */
/*             |                                           |              */
/*             |                                           |              */
/*             |____    _______    __  ____    _   ___   __|KCK/SGA       */
/*            /A\                                           \             */
/*           ((o))                                           )            */
/*            '-'-------------------------------------------'             */
/*                                                                        */
/*                                                                        */
/* Copyright 2017, Amduus Information Works, Inc., Scott Auge             */
/* All rights reserved.                                                   */
/* http://www/amduus.com   sauge@amduus.com                               */
/*                                                                        */
/**************************************************************************/
/* Purpose: The xpathparse class.                                         */
/**************************************************************************/

USING auxiliar.yaxmlparser.xpathparse FROM PROPATH.

DEFINE VARIABLE a AS xpathparse NO-UNDO.

a = NEW xpathparse ("D:\temp\resultado.xml").

a:DumpToFile("d:\temp/Data.d").

OUTPUT TO "D:\temp\xmltimbrado.xml".
PUT UNFORMATTED STRING(a:FindByXPathAsLongChar ("/tns:quick_stampResponse/tns:quick_stampResult/s0:xml")).

MESSAGE a:FindByXPathAsLongChar ("/tns:quick_stampResponse/tns:quick_stampResult/s0:CodEstatus")
    VIEW-AS ALERT-BOX INFORMATION BUTTONS OK.

MESSAGE "FindByXPath (uuid): " a:FindByXPath ("/tns:quick_stampResponse/tns:quick_stampResult/s0:UUID")
  VIEW-AS ALERT-BOX.

MESSAGE "FindByXPath (fecha): " a:FindByXPath ("/tns:quick_stampResponse/tns:quick_stampResult/s0:fecha")
    VIEW-AS ALERT-BOX.

MESSAGE "FindByXPath (SatSeal): " a:FindByXPath ("/tns:quick_stampResponse/tns:quick_stampResult/s0:SatSeal")
    VIEW-AS ALERT-BOX.

MESSAGE "FindByXPath (NoCertificadoSAT): " a:FindByXPath ("/tns:quick_stampResponse/tns:quick_stampResult/s0:NoCertificadoSAT")
    VIEW-AS ALERT-BOX.


DELETE OBJECT a.

Done!.

It happens that there are very clever people among us.

Scott Augé being one of them

Posted by OctavioOlguin on 21-Dec-2017 07:26

DONE!

It happens that there are very clever people among us

Scott Augé being one of them.

/**************************************************************************/

/* Copyright 2017, Amduus Information Works, Inc., Scott Auge             */

/* All rights reserved.                                                   */

/* http://www/amduus.com   sauge@amduus.com                               */

/*                                                                        */

/*                                                                        */

/**************************************************************************/

/* Purpose: The xpathparse class.                                         */

/**************************************************************************/

USING auxiliar.yaxmlparser.xpathparse FROM PROPATH.

DEFINE VARIABLE a AS xpathparse NO-UNDO.

a = NEW xpathparse ("D:\temp\resultado.xml").

a:DumpToFile("d:\temp/Data.d").

OUTPUT TO "D:\temp\xmltimbrado.xml".

PUT UNFORMATTED STRING(a:FindByXPathAsLongChar ("/tns:quick_stampResponse/tns:quick_stampResult/s0:xml")).

MESSAGE a:FindByXPathAsLongChar ("/tns:quick_stampResponse/tns:quick_stampResult/s0:CodEstatus")

   VIEW-AS ALERT-BOX INFORMATION BUTTONS OK.

MESSAGE "FindByXPath (uuid): " a:FindByXPath ("/tns:quick_stampResponse/tns:quick_stampResult/s0:UUID")

 VIEW-AS ALERT-BOX.

MESSAGE "FindByXPath (fecha): " a:FindByXPath ("/tns:quick_stampResponse/tns:quick_stampResult/s0:fecha")

   VIEW-AS ALERT-BOX.

MESSAGE "FindByXPath (SatSeal): " a:FindByXPath ("/tns:quick_stampResponse/tns:quick_stampResult/s0:SatSeal")

   VIEW-AS ALERT-BOX.

MESSAGE "FindByXPath (NoCertificadoSAT): " a:FindByXPath ("/tns:quick_stampResponse/tns:quick_stampResult/s0:NoCertificadoSAT")

   VIEW-AS ALERT-BOX.

DELETE OBJECT a.

This thread is closed