Here is a piece of code I found. I adapted it to my needs and it works great.
Thanks,
You have to add the Reference "Microsoft XML"
Private Sub Command85_Click()
Dim xmldoc As MSXML2.DOMDocument
Dim xmlNode As MSXML2.IXMLDOMNode
Dim xmlNodeList As MSXML2.IXMLDOMNodeList
Dim myNode As MSXML2.IXMLDOMNode
Dim dir, folder, files
Dim PRange As String
Dim wo As String
wo = WO_Num
Set fso = CreateObject("Scripting.FileSystemObject")
dir = "O:\Order Tracking Router\OTR Data\"
Set xmldoc = New MSXML2.DOMDocument
xmldoc.async = False
xmldoc.Load (dir & wo & ".xml")
Set xmlNodeList = xmldoc.getElementsByTagName("OTR_link")
For Each xmlNode In xmlNodeList
For Each myNode In xmlNode.childNodes
If myNode.nodeType = NODE_TEXT Then
List0.AddItem (xmlNode.Text)
'MsgBox xmlNode.nodeName & "=" & xmlNode.Text
End If
Next myNode
Next xmlNode
Set xmlNodeList = xmldoc.getElementsByTagName("sow")
For Each xmlNode In xmlNodeList
For Each myNode In xmlNode.childNodes
If myNode.nodeType = NODE_TEXT Then
List0.AddItem (xmlNode.Text)
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.