Click to See Complete Forum and Search --> : search xml file for text between two tags
blazerowners
Jun 11th, 2001, 01:42 PM
What's the best way to go about searching an external xml file for the text between two tags and assigning that text to a string? Some of these xml files can get rather lengthy and I'm trying to figure out the most efficient way possible.
Thanks! :D
Mark Sreeves
Jun 12th, 2001, 05:02 AM
What language will you be using?
blazerowners
Jun 12th, 2001, 10:59 AM
Visual Basic...
Cander
Jun 12th, 2001, 11:26 AM
lets say you have an xml doc myxmldoc.xml that looks like this
<blah>
<test>hiya</test>
</blah>
to get the text in test:
Dim xmlDoc As MSXML.DOMDocument
Dim xmltext as string
Set xmlDoc = New MSXML.DOMDocument
xmlDoc.async = False
xmlDoc.load "c:\myxmldoc.xml"
xmltext = xmlDoc.selectSingleNode("blah/test").text
blazerowners
Jun 18th, 2001, 11:15 AM
I'm using XSLT on this XML file as well.... How would you apply a XSL transformation to the example you provided?
Thanks for the help. Your explanation makes good sense.
Tom
www.blazerowners.com
Chevy Blazer Owner's Club
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.