473,406 Members | 2,705 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

XML --> ASP tutorial?

Hi,

I'd like to take the contents of an XML file and bring the data into an
ASP document as an array. Sounds pretty simple (and even though I
primarily use ASP, I was able to figure out PHP's SimpleXML in about 10
minutes to do something similar).

Anyway, I'm having a terrible time finding an online resource to walk me
through it.

I know I can connect the XML file and retrieve the data in a fairly
static manner using Microsoft.XMLDOM, but what I'd like to learn is how
to cycle through all of the child nodes and populate an array in one
swoop, but I can't find the proper syntax for it.

Most of the online XML resources seem to focus on .NET or other non-
Classic ASP systems.

Thanks.
Jul 22 '05 #1
1 1472
Travis Pupkin wrote:
Hi,

I'd like to take the contents of an XML file and bring the data into
an ASP document as an array. Sounds pretty simple (and even though I
primarily use ASP, I was able to figure out PHP's SimpleXML in about
10 minutes to do something similar).

Anyway, I'm having a terrible time finding an online resource to walk
me through it.

I know I can connect the XML file and retrieve the data in a fairly
static manner using Microsoft.XMLDOM, but what I'd like to learn is
how to cycle through all of the child nodes and populate an array in
one swoop, but I can't find the proper syntax for it.

Most of the online XML resources seem to focus on .NET or other non-
Classic ASP systems.

Thanks.


The XMLDOM reference can be found here:
http://msdn.microsoft.com/library/en...l/xmmscXML.asp
You basically want to concentrate on the DOM reference.
For a quick example:

<%
dim xmldoc, ar(1), oNode, i
set xmldoc=createobject("msxml2.DOMDocument")
xmldoc.loadxml "<root><node>data1</node><node>" & _
"data2</node></root>"
i=0
for each oNode in xmldoc.documentelement.childnodes
ar(i) = oNode.text
next
%>

Bob Barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 22 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: NOSPAM | last post by:
Hello, I am hoping you can help me with the following problem; I need to process the following steps every couple of hours in order to keep our Sql 2000 database a small as possible (the...
8
by: Daniel Hansen | last post by:
I know this must seem totally basic and stupid, but I cannot find any reference that describes how to control the spacing between <p>...</p> and <div>...</div> blocks. When I implement these on a...
4
by: rob c | last post by:
This is a minor thing and only appears in IE (so far), but I'd like to know to correct it (if possible). Whenever I use a form on a webpage, Explorer always leaves a blank line following the...
3
by: Harry Zoroc | last post by:
I would like to learn some XSLT-FO handling procedures and need a good tutorial. Unfortunately most of the links in Google refer to books, lessons, XML syntax What I need is an easy...
1
by: Valerie | last post by:
Hello everyone, I am new in PHP-programming but I am learning the basics of it. I've got a script that uploads a picture together with all data from the inputform, to the server and places the...
5
by: FFMG | last post by:
Hi, Seen that support for PHP4 will be dropped at the end of the year I was thinking that maybe now might be a good time to start moving things. Is there a tutorial as to what I need to look...
4
by: pdlemper | last post by:
Have carefully installed Python 2.5.1 under XP in dir E:\python25 . ran set path = %path% ; E:\python25 Python interactive mode works fine for simple arithmetic . Then tried >> import math Get...
42
by: barcaroller | last post by:
In the boost::program_options tutorial, the author included the following code: cout << "Input files are: " << vm.as< vector<string() << "\n"; Basically, he is trying to print a vector...
0
by: Jeff | last post by:
Hi I'm following this tutorial: http://dev.live.com/gadgets/sdk/docs/default.htm And downloaded that sample file. Now I've created a simple web gadget project on my own:. I just made a copy...
3
by: turgon | last post by:
At the moment I making an ajax based file manager system. Im approched by a tricky problem. As in windows explorer etc I want users to be able to select any free space, click down, and drag a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.