Leer etiquetas especificas de un xml - SOLUCIONADO

Leer etiquetas especificas de un xml - SOLUCIONADO

Postby leandro » Tue Oct 18, 2022 7:19 pm

Buenas tardes para todos,

En este momento logramos recuperar la información de las etiquetas de un archivo xml, recorriéndolo todo, pero esta pasando que en algunos casos la información viene organizada de manera diferente, el nodo esta, pero en una posición diferente ó un nodo cercano tiene el mismo nombre.

Code: Select all  Expand view  RUN


            hFile2    := FOpen( cGRuta )
            oXmlDoc  := TXmlDocument():New( hFile2 )
            oXmlIter := TXmlIterator():New( oXmlDoc:oRoot )
            while .T.
                oTagActual = oXmlIter:Next()
                //msginfo(oTagActual:cName)
                If oTagActual != nil

                    if lSig==.T. .and. oTagActual:cName==nil
                        if nPrim==1
                            cText := oTagActual:cData
                        endif
                        nPrim++
                    endif

                    if oTagActual:cName=="cbc:Description"
                        lSig := .T.
                    else
                        lSig := .F.
                    endif

                Else
                    Exit
                Endif
            End
            FClose( hFile2 )

 


Puedo recuperar nodos específicos dentro del xml, sin tener que recorrer todo el archivo?

De antemano gracias
Saludos
LEANDRO AREVALO
Bogotá (Colombia)
https://hymlyma.com
https://hymplus.com/
leandroalfonso111@gmail.com
leandroalfonso111@hotmail.com

[ Embarcadero C++ 7.60 for Win32 ] [ FiveWin 23.07 ] [ xHarbour 1.3.0 Intl. (SimpLex) (Build 20230914) ]
User avatar
leandro
 
Posts: 1688
Joined: Wed Oct 26, 2005 2:49 pm
Location: Colombia

Re: Leer etiquetas especificas de un xml

Postby Cgallegoa » Wed Oct 19, 2022 12:30 am

Leando prueba a ver si es lo que necesitas:

Code: Select all  Expand view  RUN
#include "FiveWin.ch"

Function Main()

   LOCAL cXml, oDoc, oNode, cNode, cNodeOrig
   LOCAL cFileName := "xmltest.xml"
   cNode := "OriginalNumber"
   IF !MsgGet( "Label to search", "Label to search:", @cNode)
      Return
   endif

   cNode := AllTrim(cNode)
   cNodeOrig := cNode

   oDoc := TXmlDocument():New( cFileName )
   oNode := oDoc:CurNode

   IF cNode != NIL
      cNode := HB_RegexComp( cNode )
   ENDIF
 
   oNode := oDoc:FindFirstRegex( cNode )
 
   MsgInfo(cNodeOrig + ":" + Space(5) + cStr(oNode:cData))

RETURN


Y xmlTest.xml :
Code: Select all  Expand view  RUN
<PhoneReturn xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://ws.cdyne.com/PhoneVerify/query">
    <Company>LEVEL 3 COMMUNICATIONS, LLC - </Company>
    <Valid>true</Valid>
    <Use>Assigned to a code holder for normal use.</Use>
    <State>VA</State>
    <RC>NRFOLKZON2</RC>
    <OCN>8825</OCN>
    <OriginalNumber>17575449510</OriginalNumber>
    <CleanNumber>7575449510</CleanNumber>
    <SwitchName/>
    <SwitchType/>
    <Country>United States</Country>
    <CLLI>NOCLLIKNOWN</CLLI>
    <PrefixType>CLEC - (Competitive Local Exchange Carrier)</PrefixType>
    <LATA>252</LATA>
    <sms>CLEC - (Competitive Local Exchange Carrier)</sms>
    <Email/>
    <AssignDate>26/09/2005</AssignDate>
    <TelecomCity>Norfolk</TelecomCity>
    <TelecomCounty>Norfolk city</TelecomCounty>
    <TelecomState>VA</TelecomState>
    <TelecomZip>23510</TelecomZip>
    <TimeZone>EST</TimeZone>
    <Lat/>
    <Long/>
    <Wireless>false</Wireless>
    <LRN>7575449510</LRN>
</PhoneReturn>
Saludos,

Carlos Gallego

*** FWH-24.07, xHarbour 1.3.1 Build 20240624, Borland C++7.70, PellesC ***
Cgallegoa
 
Posts: 494
Joined: Sun Oct 16, 2005 3:32 am
Location: Quito - Ecuador

Re: Leer etiquetas especificas de un xml

Postby leandro » Wed Oct 19, 2022 12:25 pm

Hola Cristobal, gracias por responder

Pero no es lo que necesito, ya que se retorna la primera coincidencia que encuentra, lo que necesitamos es podernos referir a un nodo en especifico por ejemplo:
AttachedDocument -> cac:ReceiverParty -> cac:PartyTaxScheme -> cac:TaxScheme -> cbc:ID

Debería devolverme ZZ

Image

Code: Select all  Expand view  RUN

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<AttachedDocument xmlns="urn:oasis:names:specification:ubl:schema:xsd:AttachedDocument-2" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:ccts="urn:un:unece:uncefact:data:specification:CoreComponentTypeSchemaModule:2" xmlns:ext="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2" xmlns:xades="http://uri.etsi.org/01903/v1.3.2#" xmlns:xades141="http://uri.etsi.org/01903/v1.4.1#">
  <cbc:UBLVersionID>UBL 2.1</cbc:UBLVersionID>
  <cbc:CustomizationID>Documentos adjuntos</cbc:CustomizationID>
  <cbc:ProfileID>DIAN 2.1</cbc:ProfileID>
  <cbc:ProfileExecutionID>2</cbc:ProfileExecutionID>
  <cbc:ID>SETP990000066</cbc:ID>
  <cbc:IssueDate>2022-10-18</cbc:IssueDate>
  <cbc:IssueTime>18:36:28-05:00</cbc:IssueTime>
  <cbc:DocumentType>Contenedor de Factura Electrónica</cbc:DocumentType>
  <cbc:ParentDocumentID>SETP990000066</cbc:ParentDocumentID>
  <cac:SenderParty>
    <cac:PartyTaxScheme>
      <cbc:RegistrationName>ANTONIO HERNANDEZ </cbc:RegistrationName>
      <cbc:CompanyID schemeAgencyID="195" schemeID="3" schemeName="31">15999999</cbc:CompanyID>
      <cbc:TaxLevelCode listName="48">R-99-PN</cbc:TaxLevelCode>
      <cac:TaxScheme>
        <cbc:ID>01</cbc:ID>
        <cbc:Name>IVA</cbc:Name>
      </cac:TaxScheme>
    </cac:PartyTaxScheme>
  </cac:SenderParty>
  <cac:ReceiverParty>
    <cac:PartyTaxScheme>
      <cbc:RegistrationName>LEANDRO  AREVALO </cbc:RegistrationName>
      <cbc:CompanyID schemeAgencyID="195" schemeID="" schemeName="13">79777777</cbc:CompanyID>
      <cbc:TaxLevelCode listName="48">R-99-PN</cbc:TaxLevelCode>
      <cac:TaxScheme>
        <cbc:ID>ZZ</cbc:ID>
        <cbc:Name>No aplica</cbc:Name>
      </cac:TaxScheme>
    </cac:PartyTaxScheme>
  </cac:ReceiverParty>
  <cac:Attachment>
    <cac:ExternalReference>
      <cbc:MimeCode>text/xml</cbc:MimeCode>
      <cbc:EncodingCode>UTF-8</cbc:EncodingCode>
      <cbc:Description><![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="no"?><Invoice xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:ext="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2" xmlns:sts="dian:gov:co:facturaelectronica:Structures-2-1" xmlns:xades="http://uri.etsi.org/01903/v1.3.2#" xmlns:xades141="http://uri.etsi.org/01903/v1.4.1#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2     http://docs.oasis-open.org/ubl/os-UBL-2 ... ce-2.1.xsd">
   <ext:UBLExtensions>
      <ext:UBLExtension>
         <ext:ExtensionContent>
            <sts:DianExtensions>
               <sts:InvoiceControl>
                  <sts:InvoiceAuthorization>18760000001</sts:InvoiceAuthorization>
                  <sts:AuthorizationPeriod>
                     <cbc:StartDate>2019-01-19</cbc:StartDate>
                     <cbc:EndDate>2030-01-19</cbc:EndDate>
                  </sts:AuthorizationPeriod>
                  <sts:AuthorizedInvoices>
                     <sts:Prefix>SETP</sts:Prefix>
                     <sts:From>990000000</sts:From>
                     <sts:To>995000000</sts:To>
                  </sts:AuthorizedInvoices>
               </sts:InvoiceControl>
               <sts:InvoiceSource>
                  <cbc:IdentificationCode listAgencyID="6" listAgencyName="United Nations Economic Commission for Europe" listSchemeURI="urn:oasis:names:specification:ubl:codelist:gc:CountryIdentificationCode-2.1">CO</cbc:IdentificationCode>
               </sts:InvoiceSource>
               <sts:SoftwareProvider>
                  <sts:ProviderID schemeAgencyID="195" schemeAgencyName="CO, DIAN (Dirección de Impuestos y Aduanas Nacionales)" schemeID="7" schemeName="31">830108049</sts:ProviderID>
                  <sts:SoftwareID schemeAgencyID="195" schemeAgencyName="CO, DIAN (Dirección de Impuestos y Aduanas Nacionales)">2d2a9cda-0738-430f-8ecf-1d01f0297dae</sts:SoftwareID>
               </sts:SoftwareProvider>
               <sts:SoftwareSecurityCode schemeAgencyID="195" schemeAgencyName="CO, DIAN (Dirección de Impuestos y Aduanas Nacionales)">481f525b5855a1ef44b5eba6d8f955cfec8bcfeda53e86ee87727e8adf8041bed4ad6db4dd0ea2d84f1f3ac0f3540c08</sts:SoftwareSecurityCode>
               <sts:AuthorizationProvider>
                  <sts:AuthorizationProviderID schemeAgencyID="195" schemeAgencyName="CO, DIAN (Dirección de Impuestos y Aduanas Nacionales)" schemeID="4" schemeName="31">800197268</sts:AuthorizationProviderID>
               </sts:AuthorizationProvider>
               <sts:QRCode>NumFac: SETP990000066FecFac: 2022-10-18HorFac: 18:36:28-05:00NitFac: 15999999DocAdq: 79777777ValFac: 1500000.00ValIva: 285000.00ValOtroIm: 0.00ValTolFac: 1785000.00CUFE: 7f18d3d8696630e84611197a12546263256a50ab15af0a8cf82e58520a3462096bdce453677773b6fec39cc488389https://catalogo-vpfe-hab.dian.gov.co/document/searchqr?documentkey=7f18d3d8696630e84611197a12546263256a50ab15af0a8cf82e58520a3462096bdce453677773b6fec39cc488389</sts:QRCode>
            </sts:DianExtensions>
         </ext:ExtensionContent>
      </ext:UBLExtension>
   <ext:UBLExtension>
    <ext:ExtensionContent><ds:Signature Id="xmldsig-6bc6408c-e4eb-4209-a573-d53b5139f236">
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
<ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/>
<ds:Reference Id="xmldsig-6bc6408c-e4eb-4209-a573-d53b5139f236-ref0" URI="">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
<ds:DigestValue>a12VmbwOMb5ky7x25dw0xCffPh+ybEF76H/WBXt85kc=</ds:DigestValue>
</ds:Reference>
<ds:Reference Type="http://uri.etsi.org/01903#SignedProperties" URI="#xmldsig-6bc6408c-e4eb-4209-a573-d53b5139f236-signedprops">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
<ds:DigestValue>3SryO7Q8N75SmwGVuH8g76HE5iwsNP5t8PKJlUkV+Tg=</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue Id="xmldsig-6bc6408c-e4eb-4209-a573-d53b5139f236-sigvalue">
fuH0CJQU4kCtawNiXM5ekQElNQC/bt3nghdHFFng4FIDg7QMhVARr5UmTF0jtcUp3IoOU9S3DM45&#13;
ZTgsGnjqQqkh38LXdqZf1HSyq4eNZWZiskIYHRYNFYDskLQwnMPL84uc3S+NsXjrvb/Y+I7iD+o8&#13;
R9EcmLzS0SlFe7M6raaE7384D/atu/cDcow2VLInuIz56Vp5fSNK115Kc17O4qx363LJOgVx8Gh3&#13;
jsihkzaperHU5OcLGOawxEaHEmaT74B0jFoK0y3GNWtJq+PPJAcG9cXUjDxhcVBWzGmOcJQMMdET&#13;
64qeZE6txe3TEHcc0qBQkJXrOwMp6mQ15Mp9wA==
</ds:SignatureValue>
<ds:KeyInfo>
<ds:X509Data>
<ds:X509Certificate>
MIIHBDCCBOygAwIBAgIKEDzAiDXgy0+TZzANBgk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#13;
/qTcP08nTA7nXzb8sITUKrt6cJguUIiS5rnuqevfLFasoKcf111oidPbRbYEcV5UD5NWT38ajNsM&#13;
uOzS0Dd4L1XFnW2wM6uDct9RxkddJ+BbqocrOgFdXvhzS4g0Rd+0nOnjxlhEdflyl1G8teNYzVua&#13;
zAy/pRsIU8R3mdRKF9NMBSn47g1tc9BGU4kOQhoQYlAlTlEPPDRpV+j/d/wsGJhHfwT4CvWLvc9T&#13;
e6FbmhVW9ADFm+BDjUJ8U20zWUiHp0i+9I+utYBbZdO+bCPM6QodbpVAx3cSb8A3vz0kPD/pylMr&#13;
0V1RfAosgRnxgwrmRTkjc3Eiyefke9sqJMFRwcHlqnSs
</ds:X509Certificate>
<ds:X509SubjectName>name=C.C,1.3.6.1.4.1.4710.1.3.2=159999993,c=CO,l=BOGOTA,st=CUNDINAMARCA,serialNumber=15999999,cn= ANTONIO HERNANDEZ ,description=FEPN GSE CL 77 7 44 OF 701,street=CR 77 89 5595</ds:X509SubjectName>
<ds:X509IssuerSerial>
<ds:X509IssuerName>c=CO,l=Bogota D.C.,o=GSE,ou=PKI,cn=Autoridad Subordinada 01 GSE,1.2.840.113549.1.9.1=info@gse.com.co</ds:X509IssuerName>
<ds:X509SerialNumber>76678541768228611265383</ds:X509SerialNumber>
</ds:X509IssuerSerial>
</ds:X509Data>
</ds:KeyInfo>
<ds:Object><xades:QualifyingProperties Target="#xmldsig-6bc6408c-e4eb-4209-a573-d53b5139f236"><xades:SignedProperties Id="xmldsig-6bc6408c-e4eb-4209-a573-d53b5139f236-signedprops"><xades:SignedSignatureProperties><xades:SigningTime>2022-10-18T18:36:29.812-05:00</xades:SigningTime><xades:SigningCertificate><xades:Cert><xades:CertDigest><ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/><ds:DigestValue>g7NGL433yIL62BNmBwEz4nwl/M73p+LnAuPoTuUsyqk=</ds:DigestValue></xades:CertDigest><xades:IssuerSerial><ds:X509IssuerName>c=CO,l=Bogota D.C.,o=GSE,ou=PKI,cn=Autoridad Subordinada 01 GSE,1.2.840.113549.1.9.1=info@gse.com.co</ds:X509IssuerName><ds:X509SerialNumber>76678541768228611265383</ds:X509SerialNumber></xades:IssuerSerial></xades:Cert><xades:Cert><xades:CertDigest><ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/><ds:DigestValue>cJkByR2PspLbgbcEiwsG5aKqFFl9ysTfvmvdkEnY4gE=</ds:DigestValue></xades:CertDigest><xades:IssuerSerial><ds:X509IssuerName>c=CO,o=GSE,ou=PKI,cn=Autoridad Raiz GSE,1.2.840.113549.1.9.1=info@gse.com.co</ds:X509IssuerName><ds:X509SerialNumber>287858738846225454503326</ds:X509SerialNumber></xades:IssuerSerial></xades:Cert><xades:Cert><xades:CertDigest><ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/><ds:DigestValue>fBylUTEuoC7x1jpPVlTQP9BPbzJ8ji4DUhoiaXq3mEM=</ds:DigestValue></xades:CertDigest><xades:IssuerSerial><ds:X509IssuerName>c=CO,o=GSE,ou=PKI,cn=Autoridad Raiz GSE,1.2.840.113549.1.9.1=info@gse.com.co</ds:X509IssuerName><ds:X509SerialNumber>106864729177600983785696</ds:X509SerialNumber></xades:IssuerSerial></xades:Cert></xades:SigningCertificate><xades:SignaturePolicyIdentifier><xades:SignaturePolicyId><xades:SigPolicyId><xades:Identifier>https://facturaelectronica.dian.gov.co/politicadefirma/v2/politicadefirmav2.pdf</xades:Identifier><xades:Description>Política de firma para facturas electrónicas de la República de Colombia</xades:Description></xades:SigPolicyId><xades:SigPolicyHash><ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/><ds:DigestValue>dMoMvtcG5aIzgYo0tIsSQeVJBDnUnfSOfBpxXrmor0Y=</ds:DigestValue></xades:SigPolicyHash></xades:SignaturePolicyId></xades:SignaturePolicyIdentifier><xades:SignerRole><xades:ClaimedRoles><xades:ClaimedRole>supplier</xades:ClaimedRole></xades:ClaimedRoles></xades:SignerRole></xades:SignedSignatureProperties></xades:SignedProperties></xades:QualifyingProperties></ds:Object>
</ds:Signature></ext:ExtensionContent>
   </ext:UBLExtension>
</ext:UBLExtensions>
   <cbc:UBLVersionID>UBL 2.1</cbc:UBLVersionID>
   <cbc:CustomizationID>10</cbc:CustomizationID>
   <cbc:ProfileID>DIAN 2.1: Factura Electrónica de Venta</cbc:ProfileID>
   <cbc:ProfileExecutionID>2</cbc:ProfileExecutionID>
   <cbc:ID>SETP990000066</cbc:ID>
   <cbc:UUID schemeID="2" schemeName="CUFE-SHA384">7f18d3d8696630e84611197a12546263256a50ab15af0a8cf82e58520a3462096bdce453677773b6fec39cc488389</cbc:UUID>
   <cbc:IssueDate>2022-10-18</cbc:IssueDate>
   <cbc:IssueTime>18:36:28-05:00</cbc:IssueTime>
   <cbc:DueDate>2022-10-18</cbc:DueDate>
   <cbc:InvoiceTypeCode>01</cbc:InvoiceTypeCode>
   <cbc:Note/>
   <cbc:TaxPointDate>2022-10-18</cbc:TaxPointDate>
   <cbc:DocumentCurrencyCode>COP</cbc:DocumentCurrencyCode>
   <cbc:LineCountNumeric>1</cbc:LineCountNumeric>
      <cac:OrderReference>
      <cbc:ID/>
   </cac:OrderReference>
   <cac:DespatchDocumentReference>
      <cbc:ID/>
   </cac:DespatchDocumentReference>
   <cac:ReceiptDocumentReference>
      <cbc:ID/>
   </cac:ReceiptDocumentReference>
   
   <cac:AccountingSupplierParty>
      <cbc:AdditionalAccountID schemeAgencyID="195">2</cbc:AdditionalAccountID>
      <cac:Party>
         <cbc:IndustryClassificationCode>6910</cbc:IndustryClassificationCode
         <cac:PartyName>
            <cbc:Name> ANTONIO HERNANDEZ </cbc:Name>
         </cac:PartyName>
         <cac:PartyName>
            <cbc:Name>Establecimiento Principal</cbc:Name>
         </cac:PartyName>
         <cac:PartyName>
            <cbc:Name> ANTONIO HERNANDEZ </cbc:Name>
         </cac:PartyName>
         <cac:PhysicalLocation>
            <cac:Address>
               <cbc:ID>11001</cbc:ID>
               <cbc:CityName>BOGOTA</cbc:CityName>
                <cbc:PostalZone>253051</cbc:PostalZone>
               <cbc:CountrySubentity>CUNDINAMARCA</cbc:CountrySubentity>
               <cbc:CountrySubentityCode>25</cbc:CountrySubentityCode>
               <cac:AddressLine>
                  <cbc:Line>CR 77 89 5595</cbc:Line>
               </cac:AddressLine>
               <cac:Country>
                  <cbc:IdentificationCode>CO</cbc:IdentificationCode>
                  <cbc:Name languageID="es">Colombia</cbc:Name>
               </cac:Country>
            </cac:Address>
         </cac:PhysicalLocation>
         <cac:PartyTaxScheme>
            <cbc:RegistrationName> ANTONIO HERNANDEZ </cbc:RegistrationName>
            <cbc:CompanyID schemeAgencyID="195" schemeAgencyName="CO, DIAN (Dirección de Impuestos y Aduanas Nacionales)" schemeID="3" schemeName="31">15999999</cbc:CompanyID>
            <cbc:TaxLevelCode listName="48">R-99-PN</cbc:TaxLevelCode>
            <cac:RegistrationAddress>
               <cbc:ID>11001</cbc:ID>
               <cbc:CityName>BOGOTA</cbc:CityName>
               <cbc:CountrySubentity>CUNDINAMARCA</cbc:CountrySubentity>
               <cbc:CountrySubentityCode>25</cbc:CountrySubentityCode>
               <cac:AddressLine>
                  <cbc:Line>CR 77 89 5595</cbc:Line>
               </cac:AddressLine>  
               <cac:Country>
                  <cbc:IdentificationCode>CO</cbc:IdentificationCode>
                  <cbc:Name languageID="es">Colombia</cbc:Name>
               </cac:Country>
            </cac:RegistrationAddress>
            <cac:TaxScheme>
               <cbc:ID>01</cbc:ID>
               <cbc:Name>IVA</cbc:Name>
            </cac:TaxScheme>
         </cac:PartyTaxScheme>
         <cac:PartyLegalEntity>
            <cbc:RegistrationName> ANTONIO HERNANDEZ </cbc:RegistrationName>
            <cbc:CompanyID schemeAgencyID="195" schemeAgencyName="CO, DIAN (Dirección de Impuestos y Aduanas Nacionales)" schemeID="3" schemeName="31">15999999</cbc:CompanyID>
            <cac:CorporateRegistrationScheme>
               <cbc:ID>SETP</cbc:ID>
               <cbc:Name>990000066</cbc:Name>
            </cac:CorporateRegistrationScheme>
         </cac:PartyLegalEntity>
         <cac:Contact>
            <cbc:Telephone>8902777</cbc:Telephone>
            <cbc:ElectronicMail>elcorreo@tudominio.com</cbc:ElectronicMail>
         </cac:Contact>
      </cac:Party>
   </cac:AccountingSupplierParty>
   <cac:AccountingCustomerParty>
      <cbc:AdditionalAccountID>2</cbc:AdditionalAccountID>
      <cac:Party>
         <cac:PartyIdentification>
            <cbc:ID schemeAgencyID="195" schemeAgencyName="CO, DIAN (Dirección de Impuestos y Aduanas Nacionales)" schemeID="" schemeName="13">79777777</cbc:ID>
         </cac:PartyIdentification>
         <cac:PartyName>
            <cbc:Name>LEANDRO  AREVALO </cbc:Name>
         </cac:PartyName>
         <cac:PhysicalLocation>
            <cac:Address>
               <cbc:ID>25754</cbc:ID>
               <cbc:CityName>SOACHA</cbc:CityName>
                <cbc:PostalZone>000000</cbc:PostalZone>
               <cbc:CountrySubentity>Cundinamarca</cbc:CountrySubentity>
               <cbc:CountrySubentityCode>25</cbc:CountrySubentityCode>
               <cac:AddressLine>
                  <cbc:Line>CL 77 88 99</cbc:Line>
               </cac:AddressLine>
               <cac:Country>
                  <cbc:IdentificationCode>CO</cbc:IdentificationCode>
                  <cbc:Name>COLOMBIA</cbc:Name>
               </cac:Country>
            </cac:Address>
         </cac:PhysicalLocation>
         <cac:PartyTaxScheme>
            <cbc:RegistrationName>LEANDRO  AREVALO </cbc:RegistrationName>
            <cbc:CompanyID schemeAgencyID="195" schemeAgencyName="CO, DIAN (Dirección de Impuestos y Aduanas Nacionales)" schemeID="" schemeName="13">79777777</cbc:CompanyID>
            <cbc:TaxLevelCode listName="48">R-99-PN</cbc:TaxLevelCode>
            <cac:RegistrationAddress>
               <cbc:ID>25754</cbc:ID>
               <cbc:CityName>SOACHA</cbc:CityName>
               <cbc:CountrySubentity>Cundinamarca</cbc:CountrySubentity>
               <cbc:CountrySubentityCode>25</cbc:CountrySubentityCode>
               <cac:AddressLine>
                  <cbc:Line>CL 77 88 99</cbc:Line>
               </cac:AddressLine>  
               <cac:Country>
                  <cbc:IdentificationCode>CO</cbc:IdentificationCode>
                  <cbc:Name languageID="es">COLOMBIA</cbc:Name>
               </cac:Country>
            </cac:RegistrationAddress>
            <cac:TaxScheme>
               <cbc:ID>ZZ</cbc:ID>
               <cbc:Name>No aplica</cbc:Name>
            </cac:TaxScheme>
         </cac:PartyTaxScheme>
         <cac:PartyLegalEntity>
            <cbc:RegistrationName>LEANDRO  AREVALO </cbc:RegistrationName>
            <cbc:CompanyID schemeAgencyID="195" schemeAgencyName="CO, DIAN (Dirección de Impuestos y Aduanas Nacionales)" schemeID="" schemeName="13">79777777</cbc:CompanyID>
            <cac:CorporateRegistrationScheme>
               <cbc:Name/>
            </cac:CorporateRegistrationScheme>
         </cac:PartyLegalEntity>
         <cac:Contact>
            <cbc:Telephone>3003957875</cbc:Telephone>
            <cbc:ElectronicMail>leandro111@hotmail.com</cbc:ElectronicMail>
         </cac:Contact>
      </cac:Party>
   </cac:AccountingCustomerParty>
   <cac:TaxRepresentativeParty>
      <cac:PartyIdentification>
         <cbc:ID schemeAgencyID="195" schemeAgencyName="CO, DIAN (Dirección de Impuestos y Aduanas Nacionales)" schemeID="" schemeName="13">79777777</cbc:ID>
      </cac:PartyIdentification>
      <cac:PartyName>
         <cbc:Name>LEANDRO  AREVALO </cbc:Name>
      </cac:PartyName>
   </cac:TaxRepresentativeParty>
   <cac:PaymentMeans>
      <cbc:ID>1</cbc:ID>
      <cbc:PaymentMeansCode>ZZZ</cbc:PaymentMeansCode>
      <cbc:PaymentDueDate>2022-10-18</cbc:PaymentDueDate>
      <cbc:PaymentID>Contado</cbc:PaymentID>
   </cac:PaymentMeans>
   <cac:PaymentTerms>
      <cbc:ReferenceEventCode>1</cbc:ReferenceEventCode>
      <cac:SettlementPeriod>
         <cbc:DurationMeasure unitCode="DAY">0</cbc:DurationMeasure>
      </cac:SettlementPeriod>
   </cac:PaymentTerms>

      <cac:TaxTotal>
      <cbc:TaxAmount currencyID="COP">285000.00</cbc:TaxAmount>
      <cbc:RoundingAmount currencyID="COP">0.00</cbc:RoundingAmount>
      <cbc:TaxEvidenceIndicator>false</cbc:TaxEvidenceIndicator>
         <cac:TaxSubtotal>
            <cbc:TaxableAmount currencyID="COP">1500000.00</cbc:TaxableAmount>
            <cbc:TaxAmount currencyID="COP">285000.00</cbc:TaxAmount>
            <cac:TaxCategory>
               <cbc:Percent>19.00</cbc:Percent>
               <cac:TaxScheme>
                  <cbc:ID>01</cbc:ID>
                  <cbc:Name>IVA</cbc:Name>
               </cac:TaxScheme>
            </cac:TaxCategory>
         </cac:TaxSubtotal>
      </cac:TaxTotal>   
   <cac:LegalMonetaryTotal>
      <cbc:LineExtensionAmount currencyID="COP">1500000.00</cbc:LineExtensionAmount>
      <cbc:TaxExclusiveAmount currencyID="COP">1500000.00</cbc:TaxExclusiveAmount>
      <cbc:TaxInclusiveAmount currencyID="COP">1785000.00</cbc:TaxInclusiveAmount>
      <cbc:AllowanceTotalAmount currencyID="COP">0.00</cbc:AllowanceTotalAmount>
      <cbc:ChargeTotalAmount currencyID="COP">0.00</cbc:ChargeTotalAmount>
      <cbc:PrepaidAmount currencyID="COP">0.00</cbc:PrepaidAmount>
      <cbc:PayableRoundingAmount currencyID="COP">0.00</cbc:PayableRoundingAmount>
      <cbc:PayableAmount currencyID="COP">1785000.00</cbc:PayableAmount>
   </cac:LegalMonetaryTotal>
         
   <cac:InvoiceLine>
      <cbc:ID>1</cbc:ID>
      <cbc:InvoicedQuantity unitCode="94">1.00</cbc:InvoicedQuantity>
      <cbc:LineExtensionAmount currencyID="COP">1500000.00</cbc:LineExtensionAmount>
      <cac:PricingReference>
            <cac:AlternativeConditionPrice>
                <cbc:PriceAmount currencyID="COP">1500000</cbc:PriceAmount>
                <cbc:PriceTypeCode>03</cbc:PriceTypeCode>
            </cac:AlternativeConditionPrice>
       </cac:PricingReference>
        <cac:AllowanceCharge>
            <cbc:ID>1</cbc:ID>
            <cbc:ChargeIndicator>false</cbc:ChargeIndicator>
            <cbc:AllowanceChargeReason>Descuento</cbc:AllowanceChargeReason>
            <cbc:MultiplierFactorNumeric>0.00</cbc:MultiplierFactorNumeric>
            <cbc:Amount currencyID="COP">0.00</cbc:Amount>
            <cbc:BaseAmount currencyID="COP">1500000.00</cbc:BaseAmount>
        </cac:AllowanceCharge>
      <cac:TaxTotal>
         <cbc:TaxAmount currencyID="COP">285000.00</cbc:TaxAmount>
         <cbc:RoundingAmount currencyID="COP">0.00</cbc:RoundingAmount>
         <cbc:TaxEvidenceIndicator>false</cbc:TaxEvidenceIndicator>
         <cac:TaxSubtotal>
            <cbc:TaxableAmount currencyID="COP">1500000.00</cbc:TaxableAmount>
            <cbc:TaxAmount currencyID="COP">285000.00</cbc:TaxAmount>
            <cac:TaxCategory>
               <cbc:Percent>19.00</cbc:Percent>
               <cac:TaxScheme>
                  <cbc:ID>01</cbc:ID>
                  <cbc:Name>IVA</cbc:Name>
               </cac:TaxScheme>
            </cac:TaxCategory>
         </cac:TaxSubtotal>
      </cac:TaxTotal>
      <cac:Item>
         <cbc:Description>PRIMER ARTIUCLO</cbc:Description>
         <cac:SellersItemIdentification>
            <cbc:ID>0001</cbc:ID>
         </cac:SellersItemIdentification>
         <cac:StandardItemIdentification>
            <cbc:ID schemeAgencyName="195" schemeID="999">0001</cbc:ID>
         </cac:StandardItemIdentification>
      </cac:Item>
      <cac:Price>
         <cbc:PriceAmount currencyID="COP">1500000.00</cbc:PriceAmount>
         <cbc:BaseQuantity unitCode="94">1.00</cbc:BaseQuantity>
      </cac:Price>
   </cac:InvoiceLine>
   
  </Invoice>]]></cbc:Description>
    </cac:ExternalReference>
  </cac:Attachment>
  <cac:ParentDocumentLineReference>
    <cbc:LineID>1</cbc:LineID>
    <cac:DocumentReference>
      <cbc:ID>SETP990000066</cbc:ID>
      <cbc:UUID schemeName="CUFE-SHA384">7f18d3d8696630e84611197a12546263256a50ab15af0a8cf82e58520a3462096bdce453677773b6fec39cc488389</cbc:UUID>
      <cbc:IssueDate>2022-10-18</cbc:IssueDate>
      <cbc:IssueTime>18:36:28-05:00</cbc:IssueTime>
      <cbc:DocumentType>ApplicationResponse</cbc:DocumentType>
      <cac:Attachment>
        <cac:ExternalReference>
          <cbc:MimeCode>text/xml</cbc:MimeCode>
          <cbc:EncodingCode>UTF-8</cbc:EncodingCode>
          <cbc:Description><![CDATA[<?xml version="1.0" encoding="utf-8" standalone="no"?><ApplicationResponse xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:ext="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2" xmlns:sts="dian:gov:co:facturaelectronica:Structures-2-1" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns="urn:oasis:names:specification:ubl:schema:xsd:ApplicationResponse-2">
  <ext:UBLExtensions>
    <ext:UBLExtension>
      <ext:ExtensionContent>
        <sts:DianExtensions>
          <sts:InvoiceSource>
            <cbc:IdentificationCode listAgencyID="6" listAgencyName="United Nations Economic Commission for Europe" listSchemeURI="urn:oasis:names:specification:ubl:codelist:gc:CountryIdentificationCode-2.1">CO</cbc:IdentificationCode>
          </sts:InvoiceSource>
          <sts:SoftwareProvider>
            <sts:ProviderID schemeID="4" schemeName="31" schemeAgencyID="195" schemeAgencyName="CO, DIAN (Dirección de Impuestos y Aduanas Nacionales)">800197268</sts:ProviderID>
            <sts:SoftwareID schemeAgencyID="195" schemeAgencyName="CO, DIAN (Dirección de Impuestos y Aduanas Nacionales)">...</sts:SoftwareID>
          </sts:SoftwareProvider>
          <sts:SoftwareSecurityCode schemeAgencyID="195" schemeAgencyName="CO, DIAN (Dirección de Impuestos y Aduanas Nacionales)">...</sts:SoftwareSecurityCode>
          <sts:AuthorizationProvider>
            <sts:AuthorizationProviderID schemeID="4" schemeName="31" schemeAgencyID="195" schemeAgencyName="CO, DIAN (Dirección de Impuestos y Aduanas Nacionales)">800197268</sts:AuthorizationProviderID>
          </sts:AuthorizationProvider>
        </sts:DianExtensions>
      </ext:ExtensionContent>
    </ext:UBLExtension>
    <ext:UBLExtension>
      <ext:ExtensionContent><ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Id="Signature-371c4611-5bc8-4c16-831e-de1e98856ffb"><ds:SignedInfo><ds:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" /><ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256" /><ds:Reference Id="Reference-7f33ab62-b494-4c55-8d4a-d9952c86bbd5" URI=""><ds:Transforms><ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /></ds:Transforms><ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256" /><ds:DigestValue>mE/ZF9YUPsGUe66shZ32WpLK/llOsNaA6roG/8x6TKg=</ds:DigestValue></ds:Reference><ds:Reference Id="ReferenceKeyInfo" URI="#Signature-371c4611-5bc8-4c16-831e-de1e98856ffb-KeyInfo"><ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256" /><ds:DigestValue>PrepUaFy7H92x2CNN149ez6aIr1vXJpPxeUFp5gFxjQ=</ds:DigestValue></ds:Reference><ds:Reference Type="http://uri.etsi.org/01903#SignedProperties" URI="#xmldsig-Signature-371c4611-5bc8-4c16-831e-de1e98856ffb-signedprops"><ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256" /><ds:DigestValue>IEYbQ7H+znnvVlxfiXmfcyg5oBNo+DVdraPh5CWv5Zw=</ds:DigestValue></ds:Reference></ds:SignedInfo><ds:SignatureValue Id="SignatureValue-371c4611-5bc8-4c16-831e-de1e98856ffb">TL8lkEHdiY1f2PvDx4Nl//euR4UvnGLmExQuT6AjH7hRWtqSP8j9ArBzE8KaFQhED7ufjqchZrq5I8NS0uwUMoFQ4a9GYv5SgCBf5X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ds:RSAKeyValue></ds:KeyValue></ds:KeyInfo><ds:Object Id="XadesObjectId-f1b383a7-345c-44b3-8ecf-24008863e33d"><xades:QualifyingProperties xmlns:xades="http://uri.etsi.org/01903/v1.3.2#" Id="QualifyingProperties-dbcc9341-f3df-46bd-9250-88cf37ba0c3a" Target="#Signature-371c4611-5bc8-4c16-831e-de1e98856ffb"><xades:SignedProperties Id="xmldsig-Signature-371c4611-5bc8-4c16-831e-de1e98856ffb-signedprops"><xades:SignedSignatureProperties><xades:SigningTime>2022-10-18T18:36:33+00:00</xades:SigningTime><xades:SigningCertificate><xades:Cert><xades:CertDigest><ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256" /><ds:DigestValue>lOUQ66ufnUv0tTTWSw3IIIHw1AQvFSKUURutt0ZErm4=</ds:DigestValue></xades:CertDigest><xades:IssuerSerial><ds:X509IssuerName>C=CO, L=Bogota D.C., O=GSE, OU=PKI, CN=Autoridad Subordinada 01 GSE, E=info@gse.com.co</ds:X509IssuerName><ds:X509SerialNumber>199839390723768342225486</ds:X509SerialNumber></xades:IssuerSerial></xades:Cert></xades:SigningCertificate><xades:SignaturePolicyIdentifier><xades:SignaturePolicyId><xades:SigPolicyId><xades:Identifier>https://facturaelectronica.dian.gov.co/politicadefirma/v2/politicadefirmav2.pdf</xades:Identifier><xades:Description /></xades:SigPolicyId><xades:SigPolicyHash><ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256" /><ds:DigestValue>dMoMvtcG5aIzgYo0tIsSQeVJBDnUnfSOfBpxXrmor0Y=</ds:DigestValue></xades:SigPolicyHash></xades:SignaturePolicyId></xades:SignaturePolicyIdentifier><xades:SignerRole><xades:ClaimedRoles><xades:ClaimedRole>supplier</xades:ClaimedRole></xades:ClaimedRoles></xades:SignerRole></xades:SignedSignatureProperties><xades:SignedDataObjectProperties><xades:DataObjectFormat ObjectReference="#Reference-7f33ab62-b494-4c55-8d4a-d9952c86bbd5"><xades:MimeType>text/xml</xades:MimeType><xades:Encoding>UTF-8</xades:Encoding></xades:DataObjectFormat></xades:SignedDataObjectProperties></xades:SignedProperties></xades:QualifyingProperties></ds:Object></ds:Signature></ext:ExtensionContent>
    </ext:UBLExtension>
  </ext:UBLExtensions>
  <cbc:UBLVersionID>UBL 2.1</cbc:UBLVersionID>
  <cbc:CustomizationID>1</cbc:CustomizationID>
  <cbc:ProfileID>DIAN 2.1</cbc:ProfileID>
  <cbc:ProfileExecutionID>2</cbc:ProfileExecutionID>
  <cbc:ID>15423410</cbc:ID>
  <cbc:UUID schemeName="CUDE-SHA384">81e8eb9f01fb64962fbbebc9a19673d3e5ab04709c66b565d994a97d5f871c515226d94637088239630e26c6b454fb6d</cbc:UUID>
  <cbc:IssueDate>2022-10-18</cbc:IssueDate>
  <cbc:IssueTime>18:36:33-05:00</cbc:IssueTime>
  <cac:SenderParty>
    <cac:PartyTaxScheme>
      <cbc:RegistrationName>Unidad Especial Dirección de Impuestos y Aduanas Nacionales</cbc:RegistrationName>
      <cbc:CompanyID schemeID="4" schemeName="31">800197268</cbc:CompanyID>
      <cac:TaxScheme>
        <cbc:ID>01</cbc:ID>
        <cbc:Name>IVA</cbc:Name>
      </cac:TaxScheme>
    </cac:PartyTaxScheme>
  </cac:SenderParty>
  <cac:ReceiverParty>
    <cac:PartyTaxScheme>
      <cbc:RegistrationName> ANTONIO HERNANDEZ </cbc:RegistrationName>
      <cbc:CompanyID schemeID="3" schemeName="31">15999999</cbc:CompanyID>
      <cac:TaxScheme>
        <cbc:ID>01</cbc:ID>
        <cbc:Name>IVA</cbc:Name>
      </cac:TaxScheme>
    </cac:PartyTaxScheme>
  </cac:ReceiverParty>
  <cac:DocumentResponse>
    <cac:Response>
      <cbc:ResponseCode>02</cbc:ResponseCode>
      <cbc:Description>Documento validado por la DIAN</cbc:Description>
    </cac:Response>
    <cac:DocumentReference>
      <cbc:ID>SETP990000066</cbc:ID>
      <cbc:UUID schemeName="CUFE-SHA384">7f18d3d8696630e84611197a12546263256a50ab15af0a8cf82e58520a3462096bdce453677773b6fec39cc488389</cbc:UUID>
    </cac:DocumentReference>
    <cac:LineResponse>
      <cac:LineReference>
        <cbc:LineID>1</cbc:LineID>
      </cac:LineReference>
      <cac:Response>
        <cbc:ResponseCode>0000</cbc:ResponseCode>
        <cbc:Description>0</cbc:Description>
      </cac:Response>
    </cac:LineResponse>
    <cac:LineResponse>
      <cac:LineReference>
        <cbc:LineID>2</cbc:LineID>
      </cac:LineReference>
      <cac:Response>
        <cbc:ResponseCode>SinCódigo</cbc:ResponseCode>
        <cbc:Description>La validación del estado del RUT próximamente estará disponible.</cbc:Description>
      </cac:Response>
    </cac:LineResponse>
    <cac:LineResponse>
      <cac:LineReference>
        <cbc:LineID>3</cbc:LineID>
      </cac:LineReference>
      <cac:Response>
        <cbc:ResponseCode>SinCódigo</cbc:ResponseCode>
        <cbc:Description>La validación del estado del RUT próximamente estará disponible.</cbc:Description>
      </cac:Response>
    </cac:LineResponse>
  </cac:DocumentResponse>
</ApplicationResponse>]]></cbc:Description>
        </cac:ExternalReference>
      </cac:Attachment>
      <cac:ResultOfVerification>
        <cbc:ValidatorID>Unidad Especial Dirección de Impuestos y Aduanas Nacionales</cbc:ValidatorID>
        <cbc:ValidationResultCode>002</cbc:ValidationResultCode>
        <cbc:ValidationDate>2022-10-18</cbc:ValidationDate>
        <cbc:ValidationTime>18:36:28-05:00</cbc:ValidationTime>
      </cac:ResultOfVerification>
    </cac:DocumentReference>
  </cac:ParentDocumentLineReference>
</AttachedDocument>
 
Saludos
LEANDRO AREVALO
Bogotá (Colombia)
https://hymlyma.com
https://hymplus.com/
leandroalfonso111@gmail.com
leandroalfonso111@hotmail.com

[ Embarcadero C++ 7.60 for Win32 ] [ FiveWin 23.07 ] [ xHarbour 1.3.0 Intl. (SimpLex) (Build 20230914) ]
User avatar
leandro
 
Posts: 1688
Joined: Wed Oct 26, 2005 2:49 pm
Location: Colombia

Re: Leer etiquetas especificas de un xml

Postby hmpaquito » Wed Oct 19, 2022 2:26 pm

Hola,

Algo rapido puede ser esto, aunque lo ordoxo es usar funciones que convierten el xml en json:

Code: Select all  Expand view  RUN
FUNCTION BuscaId(cXml)
Local nAt, nPos1, nPos2, cId
nAt:= At("<cac:TaxScheme>", cXml)
cXml:= SubStr(cXml, nAt)
nPos1:= At("<cbc:ID>", cXml)
nPos2:= At("</cbc:ID>", cXml
IF nPos1 = 0 .OR. nPos2 = 0
   ERROR_("No encontrado !!", cXml, nPos1, nPos2)
ELSE
   cId:= SubStr(cXml, nPos1, nPos2- nPos1)
ENDIF
RETURN cId
 

Salu2
hmpaquito
 
Posts: 1482
Joined: Thu Oct 30, 2008 2:37 pm

Re: Leer etiquetas especificas de un xml

Postby karinha » Wed Oct 19, 2022 4:35 pm

Code: Select all  Expand view  RUN

// \SAMPLES\LEANDRO4.PRG

#Include "FiveWin.ch"

STATIC oWnd

MEMVAR wTEXTO

FUNCTION Main()

   LOCAL cXml, cRetID

   cXml   := MemoRead( "LEANDRO.XML" )

   cRetID := BuscaId( cXml )

   XBrowse( cRetID )

RETURN NIL

FUNCTION BuscaId( cXml )

   LOCAL nAt, nPos1, nPos2, cId

   nAt   := At("<cac:TaxScheme>", cXml)
   cXml  := SubStr(cXml, nAt)
   nPos1 := At( "<cbc:ID>",  cXml )
   nPos2 := At( "</cbc:ID>", cXml )

   IF nPos1 = 0 .OR. nPos2 = 0

      MsgStop( "No encontrado !!", cXml, nPos1, nPos2 )

   ELSE

      cId := SubStr( cXml, nPos1, nPos2 - nPos1 )

   ENDIF

RETURN( cId )

// Fin
 


Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7872
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Leer etiquetas especificas de un xml

Postby Cgallegoa » Thu Oct 20, 2022 1:58 am

Leandro mira si esto te funciona:

Code: Select all  Expand view  RUN
#include "FiveWin.ch"

PROCEDURE Main()
   LOCAL oNode
   LOCAL cFileName := "_Leandro.xml"
   LOCAL cPath     := ""

   cPath := "AttachedDocument -> cac:ReceiverParty -> cac:PartyTaxScheme -> cac:TaxScheme -> cbc:ID"
     oNode := SearchPathXml( cFileName , cPath )
   xBrowse(oNode, oNode:cName + "  :  " + cStr(oNode:cData))

   cPath  := "AttachedDocument -> cac:ParentDocumentLineReference -> cac:DocumentReference -> cbc:ID"
     oNode := SearchPathXml( cFileName , cPath )
   xBrowse(oNode, oNode:cName + "  :  " + cStr(oNode:cData))

   cPath  := "AttachedDocument -> cac:ReceiverParty -> cac:PartyTaxScheme -> cbc:RegistrationName"
     oNode := SearchPathXml( cFileName , cPath )
   xBrowse(oNode, oNode:cName + "  :  " + cStr(oNode:cData))

   cPath  := "AttachedDocument -> cac:SenderParty -> cac:PartyTaxScheme -> cbc:RegistrationName"
     oNode := SearchPathXml( cFileName , cPath )
   xBrowse(oNode, oNode:cName + "  :  " + cStr(oNode:cData))

return nil
//-----------------------------------------------------//

Function SearchPathXml( cFileName , cPath )
   LOCAL oDoc, oNode, aNodes
   LOCAL cPath2 := "/" + StrTran( cPath , " -> " , "/" )

   aNodes := HB_ATokens(cPath , " -> ")
 
   oDoc := TXmlDocument():New( cFileName )
   oNode := oDoc:CurNode

   oNode := oDoc:FindFirst( ATAIL(aNodes) )

   DO WHILE oNode != NIL

      if HB_ISOBJECT(oNode)
         if oNode:Path() == cPath2
            exit
         endif
      else
         exit
      endif

      oNode := oDoc:FindNext()

   ENDDO

Return(oNode)
 
Saludos,

Carlos Gallego

*** FWH-24.07, xHarbour 1.3.1 Build 20240624, Borland C++7.70, PellesC ***
Cgallegoa
 
Posts: 494
Joined: Sun Oct 16, 2005 3:32 am
Location: Quito - Ecuador

Re: Leer etiquetas especificas de un xml

Postby leandro » Thu Oct 20, 2022 12:21 pm

Gracias a todos por la ayuda :D

Amigo Carlos muchas gracias, era exactamente lo que buscábamos.
Saludos
LEANDRO AREVALO
Bogotá (Colombia)
https://hymlyma.com
https://hymplus.com/
leandroalfonso111@gmail.com
leandroalfonso111@hotmail.com

[ Embarcadero C++ 7.60 for Win32 ] [ FiveWin 23.07 ] [ xHarbour 1.3.0 Intl. (SimpLex) (Build 20230914) ]
User avatar
leandro
 
Posts: 1688
Joined: Wed Oct 26, 2005 2:49 pm
Location: Colombia


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 100 guests