Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XML

Status
Not open for further replies.

robin88

Technical User
Jul 5, 2001
1
DE
hi.....guys.......can some of u give me a favor about XML ???

I tried to retrieve the data from XML file using MSXML2 and want to display into textbox control, but so far it doesn't work.

my xml code more or less :

<Head>
<Name>andy</Name>
</Head>

my question is simple: how can i retrieve and display andy inside node <Name> in XML file into text box using vb6.

thank's
 
Dim LDomDoc as IXMLDomDocument
Dim Lnode As IXMLDOMNode

set LDomDoc = new IXMLDomDocument
LDomDoc.loadXML strXML

Lnode = LDomDoc.documentElement.selectSingleNode(&quot;Head/Name&quot;)

msgbox Lnode.Text

I haven't tested this but it should work. There are a lot of methods and different ways of getting at the data within the MSXML dll, it's worth taking some time and reading the documentation with MSDN about it.

Madlarry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top