Loading and Retrieving the Contents of an XML File : XML Data « XML « VBA / Excel / Access / Word






Loading and Retrieving the Contents of an XML File

 
          
Sub ReadXMLDoc() 
    Dim xmldoc As MSXML2.DOMDocument50 
    Set xmldoc = New MSXML2.DOMDocument50 

    xmldoc.async = False 
    If xmldoc.Load("C:\yourFile.xml") Then 
        Debug.Print xmldoc.XML 
        Debug.Print xmldoc.Text 
    End If 
End Sub 

 








Related examples in the same category

1.Working with XML Document Nodes
2.Retrieving Information from Element Nodes
3.Retrieving Specific Information from Element Nodes
4.Retrieving the First Matching Node