Hi, everyone, I need to read a tons of xml files like this one:
<?xml version="1.0" encoding="UTF-8"?>
<IM>
<CR ID1="13" ID2="460">
</CR>
</IM>
my code in VBA is like:
For i = 1 To 100 'suppose i have 100 xml files
Filename = Sheet1.Cells(i, 1) 'where i store the file path
Set Doc = New...
Dim odc As DOMDocument
Dim odc1 As IXMLDOMElement
Dim nde As IXMLDOMNode
Dim a As IXMLDOMElement
Set odc = New MSXML2.DOMDocument
odc.Load ("example.xml")
For Each nde In odc.SelectNodes("ExportCR")
Set a = nde.SelectSingleNode("CR")
Debug.Print a.Text
Next
--------------i could only write...
it works now....
but my another question....how can i get information within each CR? Should I also define CR as IXMLDOMElement? Or define CR as other type?
Thanks a lot
Hey guys,
Im really new to XML and actually also new to VB6...But i do need to solve the following problem. I need to read the following xml file using either VBA or VB6.0 and save the information into txt as:
Date1 Date2 Response R_ID ID1 Des1 ID2 Des3
0109 0108 This...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.