anonymous user
anonymous user

Reputation: 159

How to extract data from a XML file

I am using the MSXML4.0 parser in VB6. I have an XML file that is browsed and selected by the user. The XML contains lot of tags.I am intersted in mining out the data that is contained in the child nodes of a tag named leadmeasurements. The lead measurements tag will also contain a lot of child nodes... I do not know how to use the MSXML 4.0 . Can anyone help me ?? i need to know wat all functions i need to call to get the nodes named leadmeasurements and then extract data from the child nodes. please give me a sample code that i can refer and get to know how to ues the MSXML4.0 functions effectively..

Upvotes: 0

Views: 1647

Answers (2)

Darrel Miller
Darrel Miller

Reputation: 142044

Ok, so here is how you get the contents of your leadmeasurements node,

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 with it?

Upvotes: 2

benPearce
benPearce

Reputation: 38333

When I was faced with the prospect of parse Xml data in VB6 I created a new COM visible class in DotNet and utilised its Xml processing functions which I could call from VB6.

Upvotes: 0

Related Questions