5 Replies Latest reply on Jul 31, 2019 3:35 PM by cormaco

    ORA-19276: XPST0005: The XPath step specifies an invalid attribute or element name: (EnvioDTE)

    cacodri

      Hello everyone

       

      Database 12.1.0.2.0.

       

      I have to extract some fields from an XML file, when I do with the following query, it works fine.

       

      select RutEmisor

            ,RutReceptor

            ,TO_TIMESTAMP(TmstFirmaEnv,'YYYY-MM-DD"T"HH24:MI:SS.FF') as Fecha

      from xmltable('.'

                passing( select EnvioDTE_XML

                         from SII_DTE_EMAIL_UPLOAD

                         where correl = 850 )

                columns RutEmisor         Varchar2(10)    path '/EnvioDTE/SetDTE/Caratula/RutEmisor'

                       ,RutReceptor       Varchar2(10)    path '/EnvioDTE/SetDTE/Caratula/RutReceptor'

                       ,TmstFirmaEnv      Varchar2(19)    path '/EnvioDTE/SetDTE/Caratula/TmstFirmaEnv'

                       );

       

      RUTEMISOR  RUTRECEPTO FECHA                     

      ----------------     -------------------- ----------------------------------------

      79760110-1     97004000-5      25/07/19 17:47:44,000000000

       

      but when I change it due to the XML structure, it delivers error

       

      select RutEmisor

            ,RutReceptor

            ,TO_TIMESTAMP(TmstFirmaEnv,'YYYY-MM-DD"T"HH24:MI:SS.FF') as Fecha

      from xmltable('/EnvioDTE/SetDTE/Caratula'

                passing( select EnvioDTE_XML

                         from SII_DTE_EMAIL_UPLOAD

                         where correl = 850 )

                columns RutEmisor         Varchar2(10)    path 'RutEmisor'

                       ,RutReceptor       Varchar2(10)    path 'RutReceptor'

                       ,TmstFirmaEnv      Varchar2(19)    path 'TmstFirmaEnv'

                       )

      Error en la línea de comandos : 2 Columna : 15

      Informe de error -

      Error SQL: ORA-19276: XPST0005: El paso de XPath especifica un nombre de atributo o elemento no válido: (EnvioDTE)

      19276. 00000 -  "XPST0005 - XPath step specifies an invalid element/attribute name: (%s)"

      *Cause:    The XPath step specified invalid element or attribute name that did not match any nodes according to the input XML schema or structure.

      *Action:   Correct the element or attribute name as the name may be mis-spelled.

       

      The table has the following structure.

       

        CREATE TABLE "COBRANZA"."SII_DTE_EMAIL_UPLOAD"

         ( "CORREL" NUMBER NOT NULL ENABLE,

      .

      ...

      .

      "PDF_ARCHIVO_NOMBRE" VARCHAR2(255 BYTE),

      "ENVIODTE_XML" "SYS"."XMLTYPE" ,

      CONSTRAINT "SII_DTE_Email_Upload_PK" PRIMARY KEY ("CORREL")

        USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS

        STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645

        PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1

        BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)

        TABLESPACE "USERS"  ENABLE,

      CONSTRAINT "SII_DTE_EMAIL_UPLOAD_UK1" UNIQUE ("CASILLA_EMAIL_CONVENIO_DTE", "EMAIL_ORIGEN", "FECHA_ENVIO")

        USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS

        STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645

        PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1

        BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)

        TABLESPACE "USERS"  ENABLE

         ) SEGMENT CREATION IMMEDIATE

        PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255

      NOCOMPRESS LOGGING

        STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645

        PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1

        BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)

        TABLESPACE "USERS"

      LOB ("ENVIODTE_PDF") STORE AS SECUREFILE (

        TABLESPACE "USERS" ENABLE STORAGE IN ROW CHUNK 8192

        NOCACHE LOGGING  NOCOMPRESS  KEEP_DUPLICATES

        STORAGE(INITIAL 106496 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645

        PCTINCREASE 0

        BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT))

        XMLTYPE COLUMN "ENVIODTE_XML" STORE AS SECUREFILE BINARY XML  (

        TABLESPACE "USERS" ENABLE STORAGE IN ROW CHUNK 8192

        CACHE  NOCOMPRESS  KEEP_DUPLICATES

        STORAGE(INITIAL 106496 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645

        PCTINCREASE 0

        BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT))

      XMLSCHEMA "EnvioDTE_v10.xsd" ELEMENT "EnvioDTE" ID 7609 DISALLOW NONSCHEMA

        ;

       

         COMMENT ON COLUMN "COBRANZA"."SII_DTE_EMAIL_UPLOAD"."ESTADO" IS 'INSERTADO / PENDIENTE';

         COMMENT ON COLUMN "COBRANZA"."SII_DTE_EMAIL_UPLOAD"."DTE_OPERACION" IS 'COM / VTA / CES';

       

        CREATE OR REPLACE EDITIONABLE TRIGGER "COBRANZA"."SII_DTE_EMAIL_UPLOAD_INSERT"

         before insert on "COBRANZA"."SII_DTE_EMAIL_UPLOAD"

         for each row

      begin 

         if inserting then

            if :NEW."CORREL" is null then

               select SEQ_SII_DTE_email_upload.nextval into :NEW."CORREL" from dual;

            end if;

         end if;

      end;

       

      /

      ALTER TRIGGER "COBRANZA"."SII_DTE_EMAIL_UPLOAD_INSERT" ENABLE;

       

      The contents of the EnvioDTE_XML column are here.

       

      The DTE schema is here

       

      To create the schema I used the following procedure.:

       

      create or replace PROCEDURE REGSCHEMA_SII AS

          v_definicion_xsd    blob;

      begin

       

       

          select definicion_xsd

          into v_definicion_xsd

          from sii_schema_xml

      --    where schema_sii = 'xmldsignature_v10';                   -- registrar primero

      --    where schema_sii = 'SiiTypes_v10';                        -- registrar segundo

      --    where schema_sii = 'DTE_v10';                             -- registrar tercero

         where schema_sii = 'EnvioDTE_v10';                        -- registrar al final

      --    where schema_sii = 'SetDTE_v10';                        -- registrar al final

         

      DBMS_XMLSCHEMA.REGISTERSCHEMA(

      --   schemaurl        => 'xmldsignature_v10.xsd',              

      --   schemaurl        => 'SiiTypes_v10.xsd',                   

      --   schemaurl        => 'DTE_v10.xsd',                        

         schemaurl        => 'EnvioDTE_v10.xsd',                   

      --   schemaurl        => 'SetDTE_v10.xsd',                   

         schemadoc        => v_definicion_xsd,

         LOCAL            => true,

         GENTYPES         => true,        --false,

      --   GENBEAN          => true,        --false,

         GENTABLES        => false,        --false,

         FORCE            => false,        --false,

         csid             => 0,               -- character set id == 0 ==> set de caracteres del archivo definicion XML

      --   OPTIONS          => 0,

         OPTIONS          => DBMS_XMLSCHEMA.REGISTER_BINARYXML,

          enablehierarchy  =>  DBMS_XMLSCHEMA.ENABLE_HIERARCHY_CONTENTS,

         OWNER            => USER

      /*

         local            IN  BOOLEAN := TRUE,

         genTypes         IN  BOOLEAN := TRUE,

         genBean          IN  BOOLEAN := FASLE,

         force            IN  BOOLEAN := FALSE,

         owner            IN  VARCHAR2 := NULL,

         enablehierarchy  IN  PLS_INTEGER := DBMS_XMLSCHEMA.ENABLE_CONTENTS,

         options          IN  PLS_INTEGER := 0

      */

                                  );

      END REGSCHEMA_SII;

       

      some help please be very much appreciated

       

       

      best regards

       

      Carlos

        • 1. Re: ORA-19276: XPST0005: The XPath step specifies an invalid attribute or element name: (EnvioDTE)
          _jum

          Can't and won't load data from unknonw sources..., please provide test data here in your thread!

           

          For me (ORA 12.1.0.2) both versions work:

           

          WITH sii_dte_email_upload(RutEmisor, RutReceptor,correl, EnvioDTE_XML) AS
           (SELECT 1,1001,850
                 , XMLTYPE('<EnvioDTE> 
                      <SetDTE>
                        <Caratula>
                          <RutEmisor>RutEmisor</RutEmisor>
                          <RutReceptor>RutReceptor</RutReceptor>
                          <TmstFirmaEnv>2019-07-31T01:02:03.44</TmstFirmaEnv>
                        </Caratula>
                      </SetDTE>
                    </EnvioDTE>')      
              FROM dual)
          SELECT RutEmisor
                ,RutReceptor
                ,TO_TIMESTAMP(TmstFirmaEnv,'YYYY-MM-DD"T"HH24:MI:SS.FF') as Fecha
            FROM xmltable('.'
                    passing( select EnvioDTE_XML
                             from SII_DTE_EMAIL_UPLOAD
                             where correl = 850 )
                    columns RutEmisor         VARCHAR2(10)    path '/EnvioDTE/SetDTE/Caratula/RutEmisor'
                           ,RutReceptor       VARCHAR2(10)    path '/EnvioDTE/SetDTE/Caratula/RutReceptor'
                           ,TmstFirmaEnv      VARCHAR2(22)    path '/EnvioDTE/SetDTE/Caratula/TmstFirmaEnv'
                           );
          

           

          RUTEMISOR    RUTRECEPTOR   FECHA

          ------------------------------------------------------

          RutEmisor    RutRecepto    31/07/2019 01:02:03.440000000

           

          WITH sii_dte_email_upload(RutEmisor, RutReceptor,correl, EnvioDTE_XML) AS
           (SELECT 1,1001,850
                 , XMLTYPE(
                   '<EnvioDTE> 
                      <SetDTE>
                        <Caratula>
                          <RutEmisor>RutEmisor</RutEmisor>
                          <RutReceptor>RutReceptor</RutReceptor>
                          <TmstFirmaEnv>2019-07-31T01:02:03.44</TmstFirmaEnv>
                        </Caratula>
                      </SetDTE>
                    </EnvioDTE>')      
              FROM dual)
          SELECT RutEmisor
                ,RutReceptor
                ,TO_TIMESTAMP(TmstFirmaEnv,'YYYY-MM-DD"T"HH24:MI:SS.FF') as Fecha
            FROM xmltable('/EnvioDTE/SetDTE/Caratula'
                    passing( select EnvioDTE_XML
                             from SII_DTE_EMAIL_UPLOAD
                             where correl = 850 )
                    columns RutEmisor         VARCHAR2(10)    path 'RutEmisor'
                           ,RutReceptor       VARCHAR2(10)    path 'RutReceptor'
                           ,TmstFirmaEnv      VARCHAR2(22)    path 'TmstFirmaEnv'
                           );   
          

           

          RUTEMISOR    RUTRECEPTOR   FECHA

          ------------------------------------------------------

          RutEmisor    RutRecepto    31/07/2019 01:02:03.440000000

           

          or as join

           

          WITH sii_dte_email_upload(RutEmisor, RutReceptor, correl, EnvioDTE_XML) AS  
           (SELECT 1,1001,850  
                 , XMLTYPE(  
                   '<EnvioDTE>   
                      <SetDTE>  
                        <Caratula>  
                          <RutEmisor>RutEmisor</RutEmisor>  
                          <RutReceptor>RutReceptor</RutReceptor>  
                          <TmstFirmaEnv>2019-07-31T01:02:03.44</TmstFirmaEnv>  
                        </Caratula>  
                      </SetDTE>  
                    </EnvioDTE>')        
              FROM dual)  
          SELECT xd.RutEmisor  
                ,xd.RutReceptor  
                ,TO_TIMESTAMP(TmstFirmaEnv,'YYYY-MM-DD"T"HH24:MI:SS.FF') as Fecha  
            FROM sii_dte_email_upload,
                xmltable('/EnvioDTE/SetDTE/Caratula'  
                    passing EnvioDTE_XML  
                    columns RutEmisor         VARCHAR2(10)    path 'RutEmisor'  
                           ,RutReceptor       VARCHAR2(10)    path 'RutReceptor'  
                           ,TmstFirmaEnv      VARCHAR2(22)    path 'TmstFirmaEnv'  
                           ) xd
           WHERE correl=850; 
          
          • 2. Re: ORA-19276: XPST0005: The XPath step specifies an invalid attribute or element name: (EnvioDTE)
            cacodri

            thank you

             

            the test data, in  EnvioDTE_XML column are:

             

            <?xml version="1.0" encoding="UTF-8"?>

            <EnvioDTE xmlns="http://www.sii.cl/SiiDte" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sii.cl/SiiDte EnvioDTE_v10.xsd" version="1">

              <SetDTE ID="SetDoc">

                <Caratula version="1">

                  <RutEmisor>79760110-1</RutEmisor>

                  <RutEnvia>6424091-9</RutEnvia>

                  <RutReceptor>97004000-5</RutReceptor>

                  <FchResol>2014-08-20</FchResol>

                  <NroResol>79</NroResol>

                  <TmstFirmaEnv>2019-07-25T17:47:44.000000</TmstFirmaEnv>

                  <SubTotDTE>

                    <TpoDTE>34</TpoDTE>

                    <NroDTE>1</NroDTE>

                  </SubTotDTE>

                  <SubTotDTE>

                    <TpoDTE>33</TpoDTE>

                    <NroDTE>2</NroDTE>

                  </SubTotDTE>

                </Caratula>

                <DTE version="1">

                  <Documento ID="F2785T34">

                    <Encabezado>

                      <IdDoc>

                        <TipoDTE>34</TipoDTE>

                        <Folio>2785</Folio>

                        <FchEmis>2019-07-25</FchEmis>

                        <TpoTranCompra>1</TpoTranCompra>

                        <TpoTranVenta>1</TpoTranVenta>

                        <FchVenc>2019-08-24</FchVenc>

                      </IdDoc>

                      <Emisor>

                        <RUTEmisor>79760110-1</RUTEmisor>

                        <RznSoc>GENERA S A</RznSoc>

                        <GiroEmis>FABR,DI,COME,PRO,COM,SE,CAPA,PR,SE,DI,IM,SI,COM.SER,MANT,PROGRAMAS</GiroEmis>

                        <Acteco>279000</Acteco>

                        <DirOrigen>AV.DEL PARQUE 5275 OF.004 </DirOrigen>

                        <CmnaOrigen>HUECHURABA</CmnaOrigen>

                      </Emisor>

                      <Receptor>

                        <RUTRecep>97004000-5</RUTRecep>

                        <RznSocRecep>BANCO CHILE</RznSocRecep>

                        <GiroRecep>BANCO</GiroRecep>

                        <DirRecep>AHUMADA 251</DirRecep>

                        <CmnaRecep>SANTIAGO</CmnaRecep>

                      </Receptor>

                      <Totales>

                        <MntExe>220427</MntExe>

                        <MntTotal>220427</MntTotal>

                      </Totales>

                    </Encabezado>

                    <Detalle>

                      <NroLinDet>1</NroLinDet>

                      <IndExe>1</IndExe>

                      <NmbItem>VIATICO LOS ANDES - ESMERALDA 301</NmbItem>

                      <QtyItem>1</QtyItem>

                      <UnmdItem>UNID</UnmdItem>

                      <PrcItem>55091</PrcItem>

                      <MontoItem>55091</MontoItem>

                    </Detalle>

                    <Detalle>

                      <NroLinDet>2</NroLinDet>

                      <IndExe>1</IndExe>

                      <NmbItem>VIATICO SANTIAGO - COLIPI 484</NmbItem>

                      <QtyItem>1</QtyItem>

                      <UnmdItem>UNID</UnmdItem>

                      <PrcItem>165336</PrcItem>

                      <MontoItem>165336</MontoItem>

                    </Detalle>

                    <Referencia>

                      <NroLinRef>1</NroLinRef>

                      <TpoDocRef>801</TpoDocRef>

                      <FolioRef>CARTA</FolioRef>

                      <FchRef>2019-03-25</FchRef>

                    </Referencia>

                    <Referencia>

                      <NroLinRef>2</NroLinRef>

                      <TpoDocRef>NVE</TpoDocRef>

                      <FolioRef>67513</FolioRef>

                      <FchRef>2019-05-28</FchRef>

                    </Referencia>

                    <TED version="1.0">

                      <DD>

                        <RE>79760110-1</RE>

                        <TD>34</TD>

                        <F>2785</F>

                        <FE>2019-07-25</FE>

                        <RR>97004000-5</RR>

                        <RSR>BANCO CHILE</RSR>

                        <MNT>220427</MNT>

                        <IT1>VIATICO LOS ANDES - ESMERALDA 301</IT1>

                        <CAF version="1.0">

                          <DA>

                            <RE>79760110-1</RE>

                            <RS>GENERA S A</RS>

                            <TD>34</TD>

                            <RNG>

                              <D>2751</D>

                              <H>2800</H>

                            </RNG>

                            <FA>2019-06-11</FA>

                            <RSAPK>

                              <M>whAs7JfsTwvRgjpQpsozQZTfkE3sylzmFe3l2U+ISPJGyMZc/J9KaB2jUC5hk9g6

            oaOKL/P7Cee59GZewAq0zQ==

             

             

            </M>

                              <E>Aw==

             

             

            </E>

                            </RSAPK>

                            <IDK>300</IDK>

                          </DA>

                          <FRMA algoritmo="SHA1withRSA">RcQ9TTYjH715QPY3tknRVi+Dlh0UIOwFxAYIooQp/hV0PRvIQhzQukhTHgP88ZHDZmHbWAgGDE5LAcBd83agBQ==</FRMA>

                        </CAF>

                        <TSTED>2019-07-25T17:46:30.000000</TSTED>

                      </DD>

                      <FRMT algoritmo="SHA1withRSA">

            JBCwyaqgi+TLCXDTqM1yYFLy4ruMrAHFi3Ga3QBpqTinOpseQ5aE2pmp24g0hOVaOdJZkBqxnNUhRNvNXrmw3w==

            </FRMT>

                    </TED>

                    <TmstFirma>2019-07-25T17:46:30.000000</TmstFirma>

                  </Documento>

                  <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">

                    <SignedInfo>

                      <CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>

                      <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>

                      <Reference URI="#F2785T34">

                        <Transforms>

                          <Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>

                        </Transforms>

                        <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>

                        <DigestValue>AXCYWh1Kt2uGobhPdUQa/nFIzPQ=

             

             

            </DigestValue>

                      </Reference>

                    </SignedInfo>

                    <SignatureValue>nDJRgfakJ3SZ5Ll034X/9Mxq4tdVwm2fdd6HvLVEHf5+AlzPbPfe0YfBq/Ks5v9e

            acmNb3pOC9kwfDZ6l+Tcbrt0eUNwEoh/KcC82v70R4mwKgT0Df1VuvJbMHgxAeGg

            YoIfv5vHFiQXDh/YO3Dlm9K/52CcoxNukMEUcKz8YzKYX3SH71i9s5ZLvnrUgKm2

            xPKAt3YUUfFuqHJaqH3LUDcYJZj2AjG7Gb2d3ekowLsrr0v2xnkxcuBX9J4jCJ8t

            DalBWUM1UrQOosgL0RUeTh/fRByEj1WOi1gOVkgmmvqN6UIECzfi5kIZyINj5/Qx

            TIpad9WGNVRU29YZADaNvQ==

             

             

            </SignatureValue>

                    <KeyInfo>

                      <KeyValue>

                        <RSAKeyValue>

                          <Modulus>sIM0fIPw+vtsAcj0EcR5HtrQaLiCy4temauU2oOZX6SBWquOyLRPW5jh6vmndxl/

            kzFiiyT/rzvPTWbVsaVNlVMHkVvu4XUcAXIRkDHz9hHAuzdP8jeGsZHf5rfe8kEq

            0AdcX/+X0ziEbTsc/mbxTS5m0aMzQZAkEryC/ZwRtn5hLOMhS0r/Oz/QbefFc+Iz

            6N/TIktjCvhHAqe9cnTU8r5QJMssdly9XCI9urJiUBGqM8O67IH2ur+U/bLzZtGf

            sm5XvIIbIWhSw8U2jVKC5L6xlwrJ4kYKoKTTTpi0cJ+gHazkj67cZ7bjIYUj66L8

            NdJuI6bNYuuvrODOhUqobQ==

             

             

            </Modulus>

                          <Exponent>AQAB</Exponent>

                        </RSAKeyValue>

                      </KeyValue>

                      <X509Data>

                        <X509Certificate>MIIGSzCCBTOgAwIBAgIIIWjpWjyjYlIwDQYJKoZIhvcNAQELBQAwga8xCzAJBgNV

            BAYTAkNMMRQwEgYDVQQKDAtFLVNpZ24gUy5BLjE5MDcGA1UECwwwVGVybXMgb2Yg

            dXNlIGF0IHd3dy5lc2lnbi1sYS5jb20vYWN1ZXJkb3RlcmNlcm9zMSswKQYDVQQD

            DCJFLVNpZ24gQ2xhc3MgMiBGaXJtYSBUcmlidXRhcmlhIENBMSIwIAYJKoZIhvcN

            AQkBFhNlLXNpZ25AZXNpZ24tbGEuY29tMB4XDTE3MDcxMjE2MjYwOFoXDTIwMDcx

            MTE2MjAwMFowgasxCzAJBgNVBAYTAkNMMRQwEgYDVQQKDAtFLVNpZ24gUy5BLjE5

            MDcGA1UECwwwVGVybXMgb2YgdXNlIGF0IHd3dy5lc2lnbi1sYS5jb20vYWN1ZXJk

            b3RlcmNlcm9zMSgwJgYDVQQDDB9BTEJFUlRPIEFOVE9OSU8gQUNIT05ETyBQSVpB

            UlJPMSEwHwYJKoZIhvcNAQkBFhJqYWNob25kb0BnZW5lcmEuY2wwggEiMA0GCSqG

            SIb3DQEBAQUAA4IBDwAwggEKAoIBAQCwgzR8g/D6+2wByPQRxHke2tBouILLi16Z

            q5Tag5lfpIFaq47ItE9bmOHq+ad3GX+TMWKLJP+vO89NZtWxpU2VUweRW+7hdRwB

            chGQMfP2EcC7N0/yN4axkd/mt97yQSrQB1xf/5fTOIRtOxz+ZvFNLmbRozNBkCQS

            vIL9nBG2fmEs4yFLSv87P9Bt58Vz4jPo39MiS2MK+EcCp71ydNTyvlAkyyx2XL1c

            Ij26smJQEaozw7rsgfa6v5T9svNm0Z+yble8ghshaFLDxTaNUoLkvrGXCsniRgqg

            pNNOmLRwn6AdrOSPrtxntuMhhSProvw10m4jps1i66+s4M6FSqhtAgMBAAGjggJr

            MIICZzCBgAYIKwYBBQUHAQEEdDByMEoGCCsGAQUFBzAChj5odHRwOi8vcGtpLmVz

            aWduLWxhLmNvbS9jYWNlcnRzL3BraUNsYXNzMkZpcm1hVHJpYnV0YXJpYUNBLmNy

            dDAkBggrBgEFBQcwAYYYaHR0cDovL29jc3AuZXNpZ24tbGEuY29tMB0GA1UdDgQW

            BBSiZmdlkSlhCqDzfJYD60nhKl4lVDAMBgNVHRMBAf8EAjAAMB8GA1UdIwQYMBaA

            FPlK+sLHbsLnEpxXRTWEGm0o6UqkMIHIBgNVHSAEgcAwgb0wgboGDCsGAQQBgspq

            AQQBAjCBqTB+BggrBgEFBQcCAjByHnAAQwBlAHIAdABpAGYAaQBjAGEAZABvACAA

            cABhAHIAYQAgAHUAcwBvACAAVAByAGkAYgB1AHQAYQByAGkAbwAsACAAQwBvAG0A

            ZQByAGMAaQBvACwAIABQAGEAZwBvAHMAIAB5ACAATwB0AHIAbwBzMCcGCCsGAQUF

            BwIBFhtodHRwOi8vd3d3LmVzaWduLWxhLmNvbS9jcHMwUQYDVR0fBEowSDBGoESg

            QoZAaHR0cDovL3BraS5lc2lnbi1sYS5jb20vY3JsL3BraUNsYXNzMkZpcm1hVHJp

            YnV0YXJpYS9lbmR1c2VyLmNybDAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYI

            KwYBBQUHAwIGCCsGAQUFBwMEMCIGA1UdEQQbMBmgFwYIKwYBBAHBAQGgCxYJNjQy

            NDA5MS05MCMGA1UdEgQcMBqgGAYIKwYBBAHBAQKgDBYKOTk1NTE3NDAtSzANBgkq

            hkiG9w0BAQsFAAOCAQEAFkyFqwyEC5L54liYEcbyCGAygmhoodjeXkpuja9kUAvN

            kTgdbE3UMqfkmQtAoydLKgeR07EsS7SDaACmkhUgZn9HAoG7T3QF6h3ASTDz1jY8

            0b6ps/YFr4yeWTG4+utLmrgSk5jgZ5D6IggB/T54CdQkaIOPywrZOmeoF4kPerJ+

            99yFKdz/rYig4pMQ7NC3RKsTPo+edMe5wZf/t3bnxAfX8fOkxv3PVlhhyTv8WkgU

            sh6f/7/ASkIdPL6KSV4iuEsrSD7Ejt5buXc+s5TfFgP5CQooTZFS5AYGlPx2OqNz

            DPPYNFHSHROUGIAfRj8sGd4Rsigvx0/7fQrrOdtVhA==

             

             

            </X509Certificate>

                      </X509Data>

                    </KeyInfo>

                  </Signature>

                </DTE>

                <DTE version="1">

                  <Documento ID="F4234T33">

                    <Encabezado>

                      <IdDoc>

                        <TipoDTE>33</TipoDTE>

                        <Folio>4234</Folio>

                        <FchEmis>2019-07-25</FchEmis>

                        <TpoTranCompra>1</TpoTranCompra>

                        <TpoTranVenta>1</TpoTranVenta>

                        <FchVenc>2019-08-24</FchVenc>

                      </IdDoc>

                      <Emisor>

                        <RUTEmisor>79760110-1</RUTEmisor>

                        <RznSoc>GENERA S A</RznSoc>

                        <GiroEmis>FABR,DI,COME,PRO,COM,SE,CAPA,PR,SE,DI,IM,SI,COM.SER,MANT,PROGRAMAS</GiroEmis>

                        <Acteco>279000</Acteco>

                        <DirOrigen>AV.DEL PARQUE 5275 OF.004 </DirOrigen>

                        <CmnaOrigen>HUECHURABA</CmnaOrigen>

                      </Emisor>

                      <Receptor>

                        <RUTRecep>97004000-5</RUTRecep>

                        <RznSocRecep>BANCO CHILE</RznSocRecep>

                        <GiroRecep>BANCO</GiroRecep>

                        <DirRecep>AHUMADA 251</DirRecep>

                        <CmnaRecep>SANTIAGO</CmnaRecep>

                      </Receptor>

                      <Totales>

                        <MntNeto>370000</MntNeto>

                        <TasaIVA>19</TasaIVA>

                        <IVA>70300</IVA>

                        <MntTotal>440300</MntTotal>

                      </Totales>

                    </Encabezado>

                    <Detalle>

                      <NroLinDet>1</NroLinDet>

                      <NmbItem>PULSADOR METALICO REDONDIO</NmbItem>

                      <QtyItem>4</QtyItem>

                      <UnmdItem>UNID</UnmdItem>

                      <PrcItem>8000</PrcItem>

                      <MontoItem>32000</MontoItem>

                    </Detalle>

                    <Detalle>

                      <NroLinDet>2</NroLinDet>

                      <NmbItem>impresora spmpe3 autocutter</NmbItem>

                      <QtyItem>1</QtyItem>

                      <UnmdItem>UNID</UnmdItem>

                      <PrcItem>121000</PrcItem>

                      <MontoItem>121000</MontoItem>

                    </Detalle>

                    <Detalle>

                      <NroLinDet>3</NroLinDet>

                      <NmbItem>CONVERSOR 12V</NmbItem>

                      <QtyItem>1</QtyItem>

                      <UnmdItem>UNID</UnmdItem>

                      <PrcItem>5000</PrcItem>

                      <MontoItem>5000</MontoItem>

                    </Detalle>

                    <Detalle>

                      <NroLinDet>4</NroLinDet>

                      <NmbItem>DISPLAY TOUCH</NmbItem>

                      <QtyItem>1</QtyItem>

                      <UnmdItem>UNID</UnmdItem>

                      <PrcItem>78000</PrcItem>

                      <MontoItem>78000</MontoItem>

                    </Detalle>

                    <Detalle>

                      <NroLinDet>5</NroLinDet>

                      <NmbItem>SUPREMA SENSOR BIOMETRICO</NmbItem>

                      <QtyItem>1</QtyItem>

                      <UnmdItem>UNID</UnmdItem>

                      <PrcItem>134000</PrcItem>

                      <MontoItem>134000</MontoItem>

                    </Detalle>

                    <Referencia>

                      <NroLinRef>1</NroLinRef>

                      <TpoDocRef>801</TpoDocRef>

                      <FolioRef>CARTA</FolioRef>

                      <FchRef>2019-03-25</FchRef>

                    </Referencia>

                    <Referencia>

                      <NroLinRef>2</NroLinRef>

                      <TpoDocRef>NVE</TpoDocRef>

                      <FolioRef>67512</FolioRef>

                      <FchRef>2019-05-28</FchRef>

                    </Referencia>

                    <TED version="1.0">

                      <DD>

                        <RE>79760110-1</RE>

                        <TD>33</TD>

                        <F>4234</F>

                        <FE>2019-07-25</FE>

                        <RR>97004000-5</RR>

                        <RSR>BANCO CHILE</RSR>

                        <MNT>440300</MNT>

                        <IT1>PULSADOR METALICO REDONDIO</IT1>

                        <CAF version="1.0">

                          <DA>

                            <RE>79760110-1</RE>

                            <RS>GENERA S A</RS>

                            <TD>33</TD>

                            <RNG>

                              <D>4223</D>

                              <H>4247</H>

                            </RNG>

                            <FA>2019-07-22</FA>

                            <RSAPK>

                              <M>4DaSU3KQ4pXFEy8pHDk2ebkq5vOfK+7GxNSXzp/FoEQ+VQxjO4kmEDqOebZoAGKA

            QX5j9WX+aujKlFr58rJnxw==

             

             

            </M>

                              <E>Aw==

             

             

            </E>

                            </RSAPK>

                            <IDK>300</IDK>

                          </DA>

                          <FRMA algoritmo="SHA1withRSA">Y5xZLCifTYjRG5cZVGU4PhgFQpxQuI/xrVfq8Ovmv/wPS/5L5hd1zYS0HO67X4SU1tllYoAroJpQElb53itjtA==</FRMA>

                        </CAF>

                        <TSTED>2019-07-25T17:46:30.000000</TSTED>

                      </DD>

                      <FRMT algoritmo="SHA1withRSA">

            udDbsZ9fAurSgPmn8aqIIkn6Vy3BdmhUP3HZ3LfqYmIs2A/+RUQxIXQmhM6+2DrnYO9ZsKMswmGnDnP6w85EZg==

            </FRMT>

                    </TED>

                    <TmstFirma>2019-07-25T17:46:30.000000</TmstFirma>

                  </Documento>

                  <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">

                    <SignedInfo>

                      <CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>

                      <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>

                      <Reference URI="#F4234T33">

                        <Transforms>

                          <Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>

                        </Transforms>

                        <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>

                        <DigestValue>anHQG8QyKbVL+19KYXMiji+rkUg=

             

             

            </DigestValue>

                      </Reference>

                    </SignedInfo>

                    <SignatureValue>iv544NY/QHrrW3sjz4C303S2TgNmMgKcPtoO+Duj9QOsGfOMArQ8+120q+Uxy6aX

            kMHQBM9nHXSb8nY1xX+TebZf/l2sIP+7o4A6ABbeUWLD47jWz9MQO0kxYUWZFR3+

            4Wdknu7PXcP3Ossa3o+5pLQlHqVm8Tee79hA2F+yYUOg8nUn6w5HSdWUp4wuQEVL

            TgZSgnRyKWkdqVvXpLFyy5ms5EI8Uz9HGJOuWbdSyphcHKsLvWbIgwFXZRMEEnht

            Cm18i+FlW5K/5z0IQar45ZFFUrBPGONRw5ry5pDRSY8GpZV6dxb3Uusi5AKsQcue

            V1oCQ8IJzJWZ50TvxM3bhQ==

             

             

            </SignatureValue>

                    <KeyInfo>

                      <KeyValue>

                        <RSAKeyValue>

                          <Modulus>sIM0fIPw+vtsAcj0EcR5HtrQaLiCy4temauU2oOZX6SBWquOyLRPW5jh6vmndxl/

            kzFiiyT/rzvPTWbVsaVNlVMHkVvu4XUcAXIRkDHz9hHAuzdP8jeGsZHf5rfe8kEq

            0AdcX/+X0ziEbTsc/mbxTS5m0aMzQZAkEryC/ZwRtn5hLOMhS0r/Oz/QbefFc+Iz

            6N/TIktjCvhHAqe9cnTU8r5QJMssdly9XCI9urJiUBGqM8O67IH2ur+U/bLzZtGf

            sm5XvIIbIWhSw8U2jVKC5L6xlwrJ4kYKoKTTTpi0cJ+gHazkj67cZ7bjIYUj66L8

            NdJuI6bNYuuvrODOhUqobQ==

             

             

            </Modulus>

                          <Exponent>AQAB</Exponent>

                        </RSAKeyValue>

                      </KeyValue>

                      <X509Data>

                        <X509Certificate>MIIGSzCCBTOgAwIBAgIIIWjpWjyjYlIwDQYJKoZIhvcNAQELBQAwga8xCzAJBgNV

            BAYTAkNMMRQwEgYDVQQKDAtFLVNpZ24gUy5BLjE5MDcGA1UECwwwVGVybXMgb2Yg

            dXNlIGF0IHd3dy5lc2lnbi1sYS5jb20vYWN1ZXJkb3RlcmNlcm9zMSswKQYDVQQD

            DCJFLVNpZ24gQ2xhc3MgMiBGaXJtYSBUcmlidXRhcmlhIENBMSIwIAYJKoZIhvcN

            AQkBFhNlLXNpZ25AZXNpZ24tbGEuY29tMB4XDTE3MDcxMjE2MjYwOFoXDTIwMDcx

            MTE2MjAwMFowgasxCzAJBgNVBAYTAkNMMRQwEgYDVQQKDAtFLVNpZ24gUy5BLjE5

            MDcGA1UECwwwVGVybXMgb2YgdXNlIGF0IHd3dy5lc2lnbi1sYS5jb20vYWN1ZXJk

            b3RlcmNlcm9zMSgwJgYDVQQDDB9BTEJFUlRPIEFOVE9OSU8gQUNIT05ETyBQSVpB

            UlJPMSEwHwYJKoZIhvcNAQkBFhJqYWNob25kb0BnZW5lcmEuY2wwggEiMA0GCSqG

            SIb3DQEBAQUAA4IBDwAwggEKAoIBAQCwgzR8g/D6+2wByPQRxHke2tBouILLi16Z

            q5Tag5lfpIFaq47ItE9bmOHq+ad3GX+TMWKLJP+vO89NZtWxpU2VUweRW+7hdRwB

            chGQMfP2EcC7N0/yN4axkd/mt97yQSrQB1xf/5fTOIRtOxz+ZvFNLmbRozNBkCQS

            vIL9nBG2fmEs4yFLSv87P9Bt58Vz4jPo39MiS2MK+EcCp71ydNTyvlAkyyx2XL1c

            Ij26smJQEaozw7rsgfa6v5T9svNm0Z+yble8ghshaFLDxTaNUoLkvrGXCsniRgqg

            pNNOmLRwn6AdrOSPrtxntuMhhSProvw10m4jps1i66+s4M6FSqhtAgMBAAGjggJr

            MIICZzCBgAYIKwYBBQUHAQEEdDByMEoGCCsGAQUFBzAChj5odHRwOi8vcGtpLmVz

            aWduLWxhLmNvbS9jYWNlcnRzL3BraUNsYXNzMkZpcm1hVHJpYnV0YXJpYUNBLmNy

            dDAkBggrBgEFBQcwAYYYaHR0cDovL29jc3AuZXNpZ24tbGEuY29tMB0GA1UdDgQW

            BBSiZmdlkSlhCqDzfJYD60nhKl4lVDAMBgNVHRMBAf8EAjAAMB8GA1UdIwQYMBaA

            FPlK+sLHbsLnEpxXRTWEGm0o6UqkMIHIBgNVHSAEgcAwgb0wgboGDCsGAQQBgspq

            AQQBAjCBqTB+BggrBgEFBQcCAjByHnAAQwBlAHIAdABpAGYAaQBjAGEAZABvACAA

            cABhAHIAYQAgAHUAcwBvACAAVAByAGkAYgB1AHQAYQByAGkAbwAsACAAQwBvAG0A

            ZQByAGMAaQBvACwAIABQAGEAZwBvAHMAIAB5ACAATwB0AHIAbwBzMCcGCCsGAQUF

            BwIBFhtodHRwOi8vd3d3LmVzaWduLWxhLmNvbS9jcHMwUQYDVR0fBEowSDBGoESg

            QoZAaHR0cDovL3BraS5lc2lnbi1sYS5jb20vY3JsL3BraUNsYXNzMkZpcm1hVHJp

            YnV0YXJpYS9lbmR1c2VyLmNybDAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYI

            KwYBBQUHAwIGCCsGAQUFBwMEMCIGA1UdEQQbMBmgFwYIKwYBBAHBAQGgCxYJNjQy

            NDA5MS05MCMGA1UdEgQcMBqgGAYIKwYBBAHBAQKgDBYKOTk1NTE3NDAtSzANBgkq

            hkiG9w0BAQsFAAOCAQEAFkyFqwyEC5L54liYEcbyCGAygmhoodjeXkpuja9kUAvN

            kTgdbE3UMqfkmQtAoydLKgeR07EsS7SDaACmkhUgZn9HAoG7T3QF6h3ASTDz1jY8

            0b6ps/YFr4yeWTG4+utLmrgSk5jgZ5D6IggB/T54CdQkaIOPywrZOmeoF4kPerJ+

            99yFKdz/rYig4pMQ7NC3RKsTPo+edMe5wZf/t3bnxAfX8fOkxv3PVlhhyTv8WkgU

            sh6f/7/ASkIdPL6KSV4iuEsrSD7Ejt5buXc+s5TfFgP5CQooTZFS5AYGlPx2OqNz

            DPPYNFHSHROUGIAfRj8sGd4Rsigvx0/7fQrrOdtVhA==

             

             

            </X509Certificate>

                      </X509Data>

                    </KeyInfo>

                  </Signature>

                </DTE>

                <DTE version="1">

                  <Documento ID="F4235T33">

                    <Encabezado>

                      <IdDoc>

                        <TipoDTE>33</TipoDTE>

                        <Folio>4235</Folio>

                        <FchEmis>2019-07-25</FchEmis>

                        <TpoTranCompra>1</TpoTranCompra>

                        <TpoTranVenta>1</TpoTranVenta>

                        <FchVenc>2019-08-24</FchVenc>

                      </IdDoc>

                      <Emisor>

                        <RUTEmisor>79760110-1</RUTEmisor>

                        <RznSoc>GENERA S A</RznSoc>

                        <GiroEmis>FABR,DI,COME,PRO,COM,SE,CAPA,PR,SE,DI,IM,SI,COM.SER,MANT,PROGRAMAS</GiroEmis>

                        <Acteco>279000</Acteco>

                        <DirOrigen>AV.DEL PARQUE 5275 OF.004 </DirOrigen>

                        <CmnaOrigen>HUECHURABA</CmnaOrigen>

                      </Emisor>

                      <Receptor>

                        <RUTRecep>97004000-5</RUTRecep>

                        <RznSocRecep>BANCO CHILE</RznSocRecep>

                        <GiroRecep>BANCO</GiroRecep>

                        <DirRecep>AHUMADA 251</DirRecep>

                        <CmnaRecep>SANTIAGO</CmnaRecep>

                      </Receptor>

                      <Totales>

                        <MntNeto>150000</MntNeto>

                        <TasaIVA>19</TasaIVA>

                        <IVA>28500</IVA>

                        <MntTotal>178500</MntTotal>

                      </Totales>

                    </Encabezado>

                    <Detalle>

                      <NroLinDet>1</NroLinDet>

                      <NmbItem>PULSADOR METALICO REDONDIO</NmbItem>

                      <QtyItem>2</QtyItem>

                      <UnmdItem>UNID</UnmdItem>

                      <PrcItem>8000</PrcItem>

                      <MontoItem>16000</MontoItem>

                    </Detalle>

                    <Detalle>

                      <NroLinDet>2</NroLinDet>

                      <NmbItem>SUPREMA SENSOR BIOMETRICO CAPACITIVO OEM</NmbItem>

                      <QtyItem>1</QtyItem>

                      <UnmdItem>UNID</UnmdItem>

                      <PrcItem>134000</PrcItem>

                      <MontoItem>134000</MontoItem>

                    </Detalle>

                    <Referencia>

                      <NroLinRef>1</NroLinRef>

                      <TpoDocRef>801</TpoDocRef>

                      <FolioRef>EMAIL</FolioRef>

                      <FchRef>2019-05-30</FchRef>

                    </Referencia>

                    <Referencia>

                      <NroLinRef>2</NroLinRef>

                      <TpoDocRef>NVE</TpoDocRef>

                      <FolioRef>67517</FolioRef>

                      <FchRef>2019-05-31</FchRef>

                    </Referencia>

                    <TED version="1.0">

                      <DD>

                        <RE>79760110-1</RE>

                        <TD>33</TD>

                        <F>4235</F>

                        <FE>2019-07-25</FE>

                        <RR>97004000-5</RR>

                        <RSR>BANCO CHILE</RSR>

                        <MNT>178500</MNT>

                        <IT1>PULSADOR METALICO REDONDIO</IT1>

                        <CAF version="1.0">

                          <DA>

                            <RE>79760110-1</RE>

                            <RS>GENERA S A</RS>

                            <TD>33</TD>

                            <RNG>

                              <D>4223</D>

                              <H>4247</H>

                            </RNG>

                            <FA>2019-07-22</FA>

                            <RSAPK>

                              <M>4DaSU3KQ4pXFEy8pHDk2ebkq5vOfK+7GxNSXzp/FoEQ+VQxjO4kmEDqOebZoAGKA

            QX5j9WX+aujKlFr58rJnxw==

             

             

            </M>

                              <E>Aw==

             

             

            </E>

                            </RSAPK>

                            <IDK>300</IDK>

                          </DA>

                          <FRMA algoritmo="SHA1withRSA">Y5xZLCifTYjRG5cZVGU4PhgFQpxQuI/xrVfq8Ovmv/wPS/5L5hd1zYS0HO67X4SU1tllYoAroJpQElb53itjtA==</FRMA>

                        </CAF>

                        <TSTED>2019-07-25T17:46:30.000000</TSTED>

                      </DD>

                      <FRMT algoritmo="SHA1withRSA">

            WM/4m0nqh08WKcOOayoIxb6kfaVEOeL6xz+LwOsuYq2YpMDaw2AEnX7aP0b+kQo5QQgoVeZ1eTfCKb5/atrcMA==

            </FRMT>

                    </TED>

                    <TmstFirma>2019-07-25T17:46:30.000000</TmstFirma>

                  </Documento>

                  <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">

                    <SignedInfo>

                      <CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>

                      <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>

                      <Reference URI="#F4235T33">

                        <Transforms>

                          <Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>

                        </Transforms>

                        <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>

                        <DigestValue>yYyC+ys7TzHmGWzcxiVhyvVqYCE=

             

             

            </DigestValue>

                      </Reference>

                    </SignedInfo>

                    <SignatureValue>evDtsGnoaCghCZu+HzJMUowZvivg0gMXoqNhmcn+HPumq+JvBfSBl5v8aRsVGWiY

            FkwJ2lcLVBlXYpUW+QxvGYcPeefh5IkHNaXBxQsHpeFpobraCp/AZ1ienUc89Bts

            +AT4LWjQa8wYnVg1MDARjH44yjxf8v77aXle5K2ufe3jAa29Qfqh4Q1m0v0ZLC+p

            oRMBD0ntqYgdlB/hrj0tRBKUra5ikFThF/deKGVYuXpeuRVetNCS4Hv8hT/8esjx

            28q9RVEfk1p0GaIFcie8RmkqPESn1xbVgBj8YdjbFZlgCjYgqe1+CdYvUFW3U8dc

            3LZ9oPDqZV7dPY9Ual7V8Q==

             

             

            </SignatureValue>

                    <KeyInfo>

                      <KeyValue>

                        <RSAKeyValue>

                          <Modulus>sIM0fIPw+vtsAcj0EcR5HtrQaLiCy4temauU2oOZX6SBWquOyLRPW5jh6vmndxl/

            kzFiiyT/rzvPTWbVsaVNlVMHkVvu4XUcAXIRkDHz9hHAuzdP8jeGsZHf5rfe8kEq

            0AdcX/+X0ziEbTsc/mbxTS5m0aMzQZAkEryC/ZwRtn5hLOMhS0r/Oz/QbefFc+Iz

            6N/TIktjCvhHAqe9cnTU8r5QJMssdly9XCI9urJiUBGqM8O67IH2ur+U/bLzZtGf

            sm5XvIIbIWhSw8U2jVKC5L6xlwrJ4kYKoKTTTpi0cJ+gHazkj67cZ7bjIYUj66L8

            NdJuI6bNYuuvrODOhUqobQ==

             

             

            </Modulus>

                          <Exponent>AQAB</Exponent>

                        </RSAKeyValue>

                      </KeyValue>

                      <X509Data>

                        <X509Certificate>MIIGSzCCBTOgAwIBAgIIIWjpWjyjYlIwDQYJKoZIhvcNAQELBQAwga8xCzAJBgNV

            BAYTAkNMMRQwEgYDVQQKDAtFLVNpZ24gUy5BLjE5MDcGA1UECwwwVGVybXMgb2Yg

            dXNlIGF0IHd3dy5lc2lnbi1sYS5jb20vYWN1ZXJkb3RlcmNlcm9zMSswKQYDVQQD

            DCJFLVNpZ24gQ2xhc3MgMiBGaXJtYSBUcmlidXRhcmlhIENBMSIwIAYJKoZIhvcN

            AQkBFhNlLXNpZ25AZXNpZ24tbGEuY29tMB4XDTE3MDcxMjE2MjYwOFoXDTIwMDcx

            MTE2MjAwMFowgasxCzAJBgNVBAYTAkNMMRQwEgYDVQQKDAtFLVNpZ24gUy5BLjE5

            MDcGA1UECwwwVGVybXMgb2YgdXNlIGF0IHd3dy5lc2lnbi1sYS5jb20vYWN1ZXJk

            b3RlcmNlcm9zMSgwJgYDVQQDDB9BTEJFUlRPIEFOVE9OSU8gQUNIT05ETyBQSVpB

            UlJPMSEwHwYJKoZIhvcNAQkBFhJqYWNob25kb0BnZW5lcmEuY2wwggEiMA0GCSqG

            SIb3DQEBAQUAA4IBDwAwggEKAoIBAQCwgzR8g/D6+2wByPQRxHke2tBouILLi16Z

            q5Tag5lfpIFaq47ItE9bmOHq+ad3GX+TMWKLJP+vO89NZtWxpU2VUweRW+7hdRwB

            chGQMfP2EcC7N0/yN4axkd/mt97yQSrQB1xf/5fTOIRtOxz+ZvFNLmbRozNBkCQS

            vIL9nBG2fmEs4yFLSv87P9Bt58Vz4jPo39MiS2MK+EcCp71ydNTyvlAkyyx2XL1c

            Ij26smJQEaozw7rsgfa6v5T9svNm0Z+yble8ghshaFLDxTaNUoLkvrGXCsniRgqg

            pNNOmLRwn6AdrOSPrtxntuMhhSProvw10m4jps1i66+s4M6FSqhtAgMBAAGjggJr

            MIICZzCBgAYIKwYBBQUHAQEEdDByMEoGCCsGAQUFBzAChj5odHRwOi8vcGtpLmVz

            aWduLWxhLmNvbS9jYWNlcnRzL3BraUNsYXNzMkZpcm1hVHJpYnV0YXJpYUNBLmNy

            dDAkBggrBgEFBQcwAYYYaHR0cDovL29jc3AuZXNpZ24tbGEuY29tMB0GA1UdDgQW

            BBSiZmdlkSlhCqDzfJYD60nhKl4lVDAMBgNVHRMBAf8EAjAAMB8GA1UdIwQYMBaA

            FPlK+sLHbsLnEpxXRTWEGm0o6UqkMIHIBgNVHSAEgcAwgb0wgboGDCsGAQQBgspq

            AQQBAjCBqTB+BggrBgEFBQcCAjByHnAAQwBlAHIAdABpAGYAaQBjAGEAZABvACAA

            cABhAHIAYQAgAHUAcwBvACAAVAByAGkAYgB1AHQAYQByAGkAbwAsACAAQwBvAG0A

            ZQByAGMAaQBvACwAIABQAGEAZwBvAHMAIAB5ACAATwB0AHIAbwBzMCcGCCsGAQUF

            BwIBFhtodHRwOi8vd3d3LmVzaWduLWxhLmNvbS9jcHMwUQYDVR0fBEowSDBGoESg

            QoZAaHR0cDovL3BraS5lc2lnbi1sYS5jb20vY3JsL3BraUNsYXNzMkZpcm1hVHJp

            YnV0YXJpYS9lbmR1c2VyLmNybDAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYI

            KwYBBQUHAwIGCCsGAQUFBwMEMCIGA1UdEQQbMBmgFwYIKwYBBAHBAQGgCxYJNjQy

            NDA5MS05MCMGA1UdEgQcMBqgGAYIKwYBBAHBAQKgDBYKOTk1NTE3NDAtSzANBgkq

            hkiG9w0BAQsFAAOCAQEAFkyFqwyEC5L54liYEcbyCGAygmhoodjeXkpuja9kUAvN

            kTgdbE3UMqfkmQtAoydLKgeR07EsS7SDaACmkhUgZn9HAoG7T3QF6h3ASTDz1jY8

            0b6ps/YFr4yeWTG4+utLmrgSk5jgZ5D6IggB/T54CdQkaIOPywrZOmeoF4kPerJ+

            99yFKdz/rYig4pMQ7NC3RKsTPo+edMe5wZf/t3bnxAfX8fOkxv3PVlhhyTv8WkgU

            sh6f/7/ASkIdPL6KSV4iuEsrSD7Ejt5buXc+s5TfFgP5CQooTZFS5AYGlPx2OqNz

            DPPYNFHSHROUGIAfRj8sGd4Rsigvx0/7fQrrOdtVhA==

             

             

            </X509Certificate>

                      </X509Data>

                    </KeyInfo>

                  </Signature>

                </DTE>

              </SetDTE>

              <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">

                <SignedInfo>

                  <CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>

                  <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>

                  <Reference URI="#SetDoc">

                    <Transforms>

                      <Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>

                    </Transforms>

                    <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>

                    <DigestValue>TxYlM2XbH2sghNb+OP9nHh8+3lE=

             

             

            </DigestValue>

                  </Reference>

                </SignedInfo>

                <SignatureValue>ABZhf/nZKOHZN3h+qAbTUj2vExwAyZPiFeoasatN/2Z0/8IZTkGO0pyrUbvQqDkN

            bm6gvRkY0RqoSpvbFIK2jXKTXOzxrjALwUcFrrnWjMTvrLSDbt/k0uL2w91A0mCh

            CMzLCf22KDalZ618u58rqP9ylYR30F2t3d7vbmQEM75r9DySvl+iaTR97/ffKAHK

            Ffr0CdOfFuTIqjRKg9zLnI64sHZVSXNiTuLDuI6GcyUgVyeC2SuaLULRQLJMPIM8

            T/lVAXJgeJp4V3mWHCIMdASofJ3zox0BDwXsoa6y5WyWHE3SAgpWF+lOjOPQKbF0

            dH/XZS/HM2IlDgpJtq1DDw==

             

             

            </SignatureValue>

                <KeyInfo>

                  <KeyValue>

                    <RSAKeyValue>

                      <Modulus>sIM0fIPw+vtsAcj0EcR5HtrQaLiCy4temauU2oOZX6SBWquOyLRPW5jh6vmndxl/

            kzFiiyT/rzvPTWbVsaVNlVMHkVvu4XUcAXIRkDHz9hHAuzdP8jeGsZHf5rfe8kEq

            0AdcX/+X0ziEbTsc/mbxTS5m0aMzQZAkEryC/ZwRtn5hLOMhS0r/Oz/QbefFc+Iz

            6N/TIktjCvhHAqe9cnTU8r5QJMssdly9XCI9urJiUBGqM8O67IH2ur+U/bLzZtGf

            sm5XvIIbIWhSw8U2jVKC5L6xlwrJ4kYKoKTTTpi0cJ+gHazkj67cZ7bjIYUj66L8

            NdJuI6bNYuuvrODOhUqobQ==

             

             

            </Modulus>

                      <Exponent>AQAB</Exponent>

                    </RSAKeyValue>

                  </KeyValue>

                  <X509Data>

                    <X509Certificate>MIIGSzCCBTOgAwIBAgIIIWjpWjyjYlIwDQYJKoZIhvcNAQELBQAwga8xCzAJBgNV

            BAYTAkNMMRQwEgYDVQQKDAtFLVNpZ24gUy5BLjE5MDcGA1UECwwwVGVybXMgb2Yg

            dXNlIGF0IHd3dy5lc2lnbi1sYS5jb20vYWN1ZXJkb3RlcmNlcm9zMSswKQYDVQQD

            DCJFLVNpZ24gQ2xhc3MgMiBGaXJtYSBUcmlidXRhcmlhIENBMSIwIAYJKoZIhvcN

            AQkBFhNlLXNpZ25AZXNpZ24tbGEuY29tMB4XDTE3MDcxMjE2MjYwOFoXDTIwMDcx

            MTE2MjAwMFowgasxCzAJBgNVBAYTAkNMMRQwEgYDVQQKDAtFLVNpZ24gUy5BLjE5

            MDcGA1UECwwwVGVybXMgb2YgdXNlIGF0IHd3dy5lc2lnbi1sYS5jb20vYWN1ZXJk

            b3RlcmNlcm9zMSgwJgYDVQQDDB9BTEJFUlRPIEFOVE9OSU8gQUNIT05ETyBQSVpB

            UlJPMSEwHwYJKoZIhvcNAQkBFhJqYWNob25kb0BnZW5lcmEuY2wwggEiMA0GCSqG

            SIb3DQEBAQUAA4IBDwAwggEKAoIBAQCwgzR8g/D6+2wByPQRxHke2tBouILLi16Z

            q5Tag5lfpIFaq47ItE9bmOHq+ad3GX+TMWKLJP+vO89NZtWxpU2VUweRW+7hdRwB

            chGQMfP2EcC7N0/yN4axkd/mt97yQSrQB1xf/5fTOIRtOxz+ZvFNLmbRozNBkCQS

            vIL9nBG2fmEs4yFLSv87P9Bt58Vz4jPo39MiS2MK+EcCp71ydNTyvlAkyyx2XL1c

            Ij26smJQEaozw7rsgfa6v5T9svNm0Z+yble8ghshaFLDxTaNUoLkvrGXCsniRgqg

            pNNOmLRwn6AdrOSPrtxntuMhhSProvw10m4jps1i66+s4M6FSqhtAgMBAAGjggJr

            MIICZzCBgAYIKwYBBQUHAQEEdDByMEoGCCsGAQUFBzAChj5odHRwOi8vcGtpLmVz

            aWduLWxhLmNvbS9jYWNlcnRzL3BraUNsYXNzMkZpcm1hVHJpYnV0YXJpYUNBLmNy

            dDAkBggrBgEFBQcwAYYYaHR0cDovL29jc3AuZXNpZ24tbGEuY29tMB0GA1UdDgQW

            BBSiZmdlkSlhCqDzfJYD60nhKl4lVDAMBgNVHRMBAf8EAjAAMB8GA1UdIwQYMBaA

            FPlK+sLHbsLnEpxXRTWEGm0o6UqkMIHIBgNVHSAEgcAwgb0wgboGDCsGAQQBgspq

            AQQBAjCBqTB+BggrBgEFBQcCAjByHnAAQwBlAHIAdABpAGYAaQBjAGEAZABvACAA

            cABhAHIAYQAgAHUAcwBvACAAVAByAGkAYgB1AHQAYQByAGkAbwAsACAAQwBvAG0A

            ZQByAGMAaQBvACwAIABQAGEAZwBvAHMAIAB5ACAATwB0AHIAbwBzMCcGCCsGAQUF

            BwIBFhtodHRwOi8vd3d3LmVzaWduLWxhLmNvbS9jcHMwUQYDVR0fBEowSDBGoESg

            QoZAaHR0cDovL3BraS5lc2lnbi1sYS5jb20vY3JsL3BraUNsYXNzMkZpcm1hVHJp

            YnV0YXJpYS9lbmR1c2VyLmNybDAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYI

            KwYBBQUHAwIGCCsGAQUFBwMEMCIGA1UdEQQbMBmgFwYIKwYBBAHBAQGgCxYJNjQy

            NDA5MS05MCMGA1UdEgQcMBqgGAYIKwYBBAHBAQKgDBYKOTk1NTE3NDAtSzANBgkq

            hkiG9w0BAQsFAAOCAQEAFkyFqwyEC5L54liYEcbyCGAygmhoodjeXkpuja9kUAvN

            kTgdbE3UMqfkmQtAoydLKgeR07EsS7SDaACmkhUgZn9HAoG7T3QF6h3ASTDz1jY8

            0b6ps/YFr4yeWTG4+utLmrgSk5jgZ5D6IggB/T54CdQkaIOPywrZOmeoF4kPerJ+

            99yFKdz/rYig4pMQ7NC3RKsTPo+edMe5wZf/t3bnxAfX8fOkxv3PVlhhyTv8WkgU

            sh6f/7/ASkIdPL6KSV4iuEsrSD7Ejt5buXc+s5TfFgP5CQooTZFS5AYGlPx2OqNz

            DPPYNFHSHROUGIAfRj8sGd4Rsigvx0/7fQrrOdtVhA==

             

             

            </X509Certificate>

                  </X509Data>

                </KeyInfo>

              </Signature>

            </EnvioDTE>

            • 3. Re: ORA-19276: XPST0005: The XPath step specifies an invalid attribute or element name: (EnvioDTE)
              _jum

              You should add the DEFAULT NAMESPACE (XML cropped):

               

              WITH sii_dte_email_upload(RutEmisor, RutReceptor,correl, EnvioDTE_XML) AS 
              (SELECT 1,1001,850 
                    , XMLTYPE( 
                      '<?xml version="1.0" encoding="UTF-8"?>
                        <EnvioDTE xmlns="http://www.sii.cl/SiiDte" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sii.cl/SiiDte EnvioDTE_v10.xsd" version="1">
                          <SetDTE ID="SetDoc">
                            <Caratula version="1">
                              <RutEmisor>79760110-1</RutEmisor>
                              <RutEnvia>6424091-9</RutEnvia>
                              <RutReceptor>97004000-5</RutReceptor>
                              <FchResol>2014-08-20</FchResol>
                              <NroResol>79</NroResol>
                              <TmstFirmaEnv>2019-07-25T17:47:44.000000</TmstFirmaEnv>
                              <SubTotDTE>
                                <TpoDTE>34</TpoDTE>
                                <NroDTE>1</NroDTE>
                              </SubTotDTE>
                              <SubTotDTE>
                                <TpoDTE>33</TpoDTE>
                                <NroDTE>2</NroDTE>
                              </SubTotDTE>
                            </Caratula>
                          </SetDTE> 
                        </EnvioDTE>')       
                  FROM dual) 
              SELECT RutEmisor 
                    ,RutReceptor 
                    ,TO_TIMESTAMP(TmstFirmaEnv,'YYYY-MM-DD"T"HH24:MI:SS.FF') as Fecha 
                FROM xmltable(XMLNAMESPACES(DEFAULT 'http://www.sii.cl/SiiDte'), '.' 
                        passing( select EnvioDTE_XML 
                                   from SII_DTE_EMAIL_UPLOAD 
                                  where correl = 850 ) 
                        columns RutEmisor        VARCHAR2(10)    path '/EnvioDTE/SetDTE/Caratula/RutEmisor' 
                              , RutReceptor      VARCHAR2(10)    path '/EnvioDTE/SetDTE/Caratula/RutReceptor' 
                              , TmstFirmaEnv     VARCHAR2(22)    path '/EnvioDTE/SetDTE/Caratula/TmstFirmaEnv' 
                              ); 
              

               

               

              RUTEMISOR    RUTRECEPTOR   FECHA

              ------------------------------------------------------

              79760110-1   97004000-5    25/07/2019 17:47:44,000000000

               

              WITH sii_dte_email_upload(RutEmisor, RutReceptor,correl, EnvioDTE_XML) AS 
              (SELECT 1,1001,850 
                    , XMLTYPE( 
                      '<?xml version="1.0" encoding="UTF-8"?>
                        <EnvioDTE xmlns="http://www.sii.cl/SiiDte" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sii.cl/SiiDte EnvioDTE_v10.xsd" version="1">
                          <SetDTE ID="SetDoc">
                            <Caratula version="1">
                              <RutEmisor>79760110-1</RutEmisor>
                              <RutEnvia>6424091-9</RutEnvia>
                              <RutReceptor>97004000-5</RutReceptor>
                              <FchResol>2014-08-20</FchResol>
                              <NroResol>79</NroResol>
                              <TmstFirmaEnv>2019-07-25T17:47:44.000000</TmstFirmaEnv>
                              <SubTotDTE>
                                <TpoDTE>34</TpoDTE>
                                <NroDTE>1</NroDTE>
                              </SubTotDTE>
                              <SubTotDTE>
                                <TpoDTE>33</TpoDTE>
                                <NroDTE>2</NroDTE>
                              </SubTotDTE>
                            </Caratula>
                          </SetDTE> 
                        </EnvioDTE>')       
                  FROM dual) 
              SELECT RutEmisor 
                    ,RutReceptor 
                    ,TO_TIMESTAMP(TmstFirmaEnv,'YYYY-MM-DD"T"HH24:MI:SS.FF') as Fecha 
                FROM xmltable(XMLNAMESPACES(DEFAULT 'http://www.sii.cl/SiiDte'), '/EnvioDTE/SetDTE/Caratula' 
                        passing( select EnvioDTE_XML 
                                   from SII_DTE_EMAIL_UPLOAD 
                                  where correl = 850 ) 
                        columns RutEmisor        VARCHAR2(10)    path 'RutEmisor' 
                              , RutReceptor      VARCHAR2(10)    path 'RutReceptor' 
                              , TmstFirmaEnv     VARCHAR2(22)    path 'TmstFirmaEnv' 
                              );   
              

               

               

              RUTEMISOR    RUTRECEPTOR   FECHA

              ------------------------------------------------------

              79760110-1   97004000-5    25/07/2019 17:47:44,000000000

              1 person found this helpful
              • 4. Re: ORA-19276: XPST0005: The XPath step specifies an invalid attribute or element name: (EnvioDTE)
                cacodri

                many thanks.

                 

                Just one more question, in the following query, as I include:

                 

                /EnvioDTE/SetDTE/DTE/Documento/Detalle/NmbItem

                 

                for NroLinDet = 1, only.

                 

                SELECT *

                  FROM xmltable(XMLNAMESPACES(DEFAULT 'http://www.sii.cl/SiiDte'), '/EnvioDTE/SetDTE/DTE/Documento'  

                          passing( select EnvioDTE_XML  

                                     from SII_DTE_EMAIL_UPLOAD  

                                    where correl = 850 )  

                          columns TipoDTE        VARCHAR2(10)    path 'Encabezado/IdDoc/TipoDTE'

                                , Folio          number          path 'Encabezado/IdDoc/Folio'  

                                , FchEmis        VARCHAR2(22)    path 'Encabezado/IdDoc/FchEmis'  

                                , FchVenc        VARCHAR2(22)    path 'Encabezado/IdDoc/FchVenc'

                                , RUTEmisor      VARCHAR2(22)    path 'Encabezado/Emisor/RUTEmisor'               

                                , RUTRecep       VARCHAR2(22)    path 'Encabezado/Receptor/RUTRecep'

                                , MntTotal       VARCHAR2(22)    path 'Encabezado/Totales/MntTotal'

                --                , NmbItem        VARCHAR2(22)    path 'Detalle/NmbItem'

                 

                 

                                );

                • 5. Re: ORA-19276: XPST0005: The XPath step specifies an invalid attribute or element name: (EnvioDTE)
                  cormaco

                  Like this:

                   

                  NmbItem    VARCHAR2(22)path 'Detalle[NroLinDet=1]/NmbItem'
                  1 person found this helpful