Saltar al contenido
View in the app

A better way to browse. Learn more.

Ayuda Excel

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

¿Como usar la referencia Microsoft XML v6.0?

publicado

Buenas tardes!
A través del presente requiero de su valioso apoyo para saber como utilizar la Referencia XML V6.0 Ya que el siguiente código me funciona correctamente con la versión 3.0, y me gustaría saber como actualizar para que funcione de la misma manera.

Codigo XML v3.0

ScreenShot1059.jpg.70340ff2ef35c0bffbac8bf7486d3440.jpg

Option Explicit
'Variables de Lectura de archivos XML
Private DocumentoXML As MSXML2.DOMDocument
Private ListaNodos As MSXML2.IXMLDOMNodeList
Private Nodo As MSXML2.IXMLDOMNode

Function CargaXML(RutaXML As String)
Set DocumentoXML = New DOMDocument
    DocumentoXML.Load (RutaXML)
End Function

Function Comprobante(Ruta As String, Dato As String)
    CargarXML (Ruta)
    Set ListaNodos = DocumentoXML.SelectNodes("/cfdi:Comprobante")
  
        For Each Nodo In ListaNodos
            Comprobante = Nodo.Attributes.getNamedItem(Dato).Text
        Next Nodo
End Function

ScreenShot1062.thumb.jpg.bf7c4b17be3e44754063daa00c9da227.jpg
 

Codigo XML v6.0

ScreenShot1060.jpg.18638062a155bcf13b1931456a8d10f7.jpg

Option Explicit
Private DocumentoXML As MSXML2.DOMDocument60
Private ListaNodos As MSXML2.IXMLDOMNodeList
Private Nodo As MSXML2.IXMLDOMNode
Public Ruta As String

Function CargarXML(Ruta As String)
Set DocumentoXML = New MSXML2.DOMDocument60
    DocumentoXML.Load (Ruta)
End Function

Function Comprobante(Ruta As String, Dato As String)
    CargarXML (Ruta)
    Set ListaNodos = DocumentoXML.SelectNodes("/cfdi:Comprobante")
   ' ListaNodos(1).SelectSingleNode(Dato).Text
    
        For Each Nodo In ListaNodos
            Comprobante = Nodo.Attributes.getNamedItem(Dato).Text
        Next Nodo
End Function

 

ScreenShot1061.thumb.jpg.16d673268ecbbb4421ed84e9648bc4e9.jpg

por su atención valioso apoyo y respuesta muchas gracias.

Adjunto archivos para pruebas

Importar XML version 3 y 6.xlsm

4660375.xml

4723915.xml

4736042.xml

Factura.xml

Featured Replies

No hay posts para mostrar

Archivado

Este tema está ahora archivado y está cerrado a más respuestas.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.