tags:

views:

135

answers:

4

Hi experts,

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..

A: 

Here's the article you want. It contains sample codes for all the operations you need.

Chathuranga Chandrasekara
A: 

This might get you going in the right direction

http://www.xml.com/pub/a/2002/03/06/efficient.html?page=last&x-order=date

PSU_Kardi
A: 

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.

benPearce
A: 

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?

Darrel Miller
Technically you should have forward slashes, not backslashes, for an XPath expression. MSXML may be forgiving of this, but other XML parses are likely not to be.
Chris J
You are absolutely correct, MSXML will not allow this either. That was my organic compiler that failed.
Darrel Miller
I've fixed it now.
Darrel Miller