Importing XML into a RecordSet
Published 02/12/02 - For
Classic ASP
Introduction
I find navigating XML using the
XMLDOM object to be hell. Some people seem to get the hang of it, but I don't.
However, I find navigating a RecordSet to be much easier. This article will
detail how to import an XML file into a RecordSet and to navigate it.
Connection
A lot of people will recognize
this code -
Dim objRS
Set objRS = Server.CreateObject("ADODB.RecordSet")
objRS.ActiveConnection = "Provider=MSDAOSP; Data
Source=MSXML2.DSOControl.2.6;"
objRS.Open(Server.MapPath("news.xml")) |
This code will create the
recordset that we will store the XML in. It is simply a regular OleDb
connection using the MSDAOSP provider.
For more information on news.xml
see here.