How to extract data from XML file
I am using MSXML4.0 parser in VB6. I have an XML file that is viewed and selected by the user. XML contains many tags. I am trying to extract the data that is contained in the child nodes of a tag named leadmeasurements. There will also be many child nodes in the measurement tag ... I don't know how to use MSXML 4.0. Can anyone help me ?? I need to know all the functions I need to call to get nodes named leadmeasurements and then retrieve data from child nodes. please give me some sample code that I can link to and learn how to efficiently execute MSXML4.0 functions.
0
a source to share
2 answers
So this is how you get the content of your lead node measurements,
Dim oDoc AS DOMDocument
Dim oNode AS IXMLDOMNode
Set oDoc = new DOMDocument40
oDoc.Load "MyXmlFile.xml"
Set oNode = oDoc.SelectSingleNode("//leadmeasurements")
MsgBox oNode.Text
Now what do you want to do about it?
+2
a source to share