Importing XML into a RecordSet
page 1 of 2
Published: 17 Oct 2003
Unedited - Community Contributed
Abstract
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.
by . .
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 25596/ 32

Connection

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.


View Entire Article

User Comments

No comments posted yet.

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-03-28 1:49:23 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search