Sub FindNode()
Dim oXmlDoc As DOMDocument
Dim oXmlNode As IXMLDOMNode
Dim oXmlNodes As IXMLDOMNodeList
Set oXmlDoc = New DOMDocument
oXmlDoc.async = False
oXmlDoc.Load (ThisWorkbook.Path & "\EmployeeSales.xml")
Set oXmlNodes = oXmlDoc.SelectNodes("/EmployeeSales/Employee/Empid")
For Each oXmlNode In oXmlNodes
Debug.Print oXmlNode.Text
Next
End Sub
|