473,320 Members | 1,916 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,320 software developers and data experts.

Need Help accessing XML Elements with ASP/ADO

Yes this looks just like the post below but seeing a was a dumba$$ and
didn't phrase my subject in the form of a question I wasn't gettting
any hits.... So here you go.

Senerio:

I am using MSXML 4.0 , ASP & ADO
I am grabbing numerous RSS News Feeds and trying to parse the data and
insert it into a dB. The problem is that the RSS News feeds are not
all the same when down in the item element.
They ALL contain the nodes: title, description, link and pubDate. But
they come in all different orders and have other child nodes sandwiched
among the ones I am after.
<channel>
<item>
<title>
<description>
<link>
<pubDate>
example: http://rss.news.yahoo.com/rss/*elections
example: http://www.cbsnews.com/feeds/r*ss/main.rss
example: http://rss.cnn.com/rss/si_tops*tories.rss
My code issue is;
When looping through the recordset I have to reference the childnode
numerically ie. item.childnodes.item(0).text,
item.childnodes.item(1).text, item.childnodes.item(2).text
But because I am trying to use the same code for every feed I want to
access the childnodes by their names:
item.childnodes.item(title).te*xt,
item.childnodes.item(descripti*on).text,
item.childnodes.item(link).tex*t
because in some feeds 0=title and in others 0=link etc etc...
I have spent three days searching the net and have not found anything.
Does anyone have a way to do this?
For those that want to give me their .Net solution I am sad to say it
must be done using ASP/ADO.
Please show me the way!!

-----O--------> E

-Gordon

Jul 20 '05 #1
1 1411
Gordon,

what you need to do is simple parsing. How about looking at the name
of the node? See property localname of XMLNode or the derived class
XMLElement

Giancarlo

"gmlear" <go*********@gmail.com> wrote in message news:<11**********************@l41g2000cwc.googleg roups.com>...
Yes this looks just like the post below but seeing a was a dumba$$ and
didn't phrase my subject in the form of a question I wasn't gettting
any hits.... So here you go.

Senerio:

I am using MSXML 4.0 , ASP & ADO
I am grabbing numerous RSS News Feeds and trying to parse the data and
insert it into a dB. The problem is that the RSS News feeds are not
all the same when down in the item element.
They ALL contain the nodes: title, description, link and pubDate. But
they come in all different orders and have other child nodes sandwiched
among the ones I am after.
<channel>
<item>
<title>
<description>
<link>
<pubDate>
example: http://rss.news.yahoo.com/rss/=ADelections
example: http://www.cbsnews.com/feeds/r=ADss/main.rss
example: http://rss.cnn.com/rss/si_tops=ADtories.rss
My code issue is;
When looping through the recordset I have to reference the childnode
numerically ie. item.childnodes.item(0).text,
item.childnodes.item(1).text, item.childnodes.item(2).text
But because I am trying to use the same code for every feed I want to
access the childnodes by their names:
item.childnodes.item(title).te=ADxt,
item.childnodes.item(descripti=ADon).text,
item.childnodes.item(link).tex=ADt
because in some feeds 0=3Dtitle and in others 0=3Dlink etc etc...
I have spent three days searching the net and have not found anything.
Does anyone have a way to do this?
For those that want to give me their .Net solution I am sad to say it
must be done using ASP/ADO.
Please show me the way!!=20

-----O--------> E=20

-Gordon

Jul 20 '05 #2

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

Similar topics

5
by: Craig Anderson | last post by:
Can anyone tell me the best way to access a hidden object in a form? I could use a hard-coded index to the elements of the form, but it's too easy to add something before the hidden object and mess...
5
by: Rune Runnestø | last post by:
How do I focus the cursor in the input field 'numberField' when accessing this jsp-file (or html-file) ? <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head>...
6
by: Chris Styles | last post by:
Dear All, I've been using some code to verify form data quite happily, but i've recently changed the way my form is structured, and I can't get it to work now. Originally : The form is...
5
by: aesahab | last post by:
Folks, I'm writing this command: form_name.elements.property_name = action; //action = true/false I want to pass the property_name as dynamic value so if the function passes "disabled" it'll...
2
by: Pasacco | last post by:
dear I want to ask help on this problem. Array a is partitioned into a0 and a1 in main(). Then a1 is partitioned into a2 and a3 in th_partition() function. And I think this problem is something...
1
by: CS Wong | last post by:
Hi, I have a page form where form elements are created dynamically using Javascript instead of programatically at the code-behind level. I have problems accessing the dynamically-created...
19
by: k.karthikit | last post by:
Hello all, In some hidden variable (<input type="hidden" name="hiddenId" value="test" /> ,i stored some value.I accessed the value "test" using var id = document.getElementById( 'hiddenId' );...
8
by: | last post by:
The problem lies here eval("document.TeeForm.amt.value(S+M)"); S and M suppose to add up and the total suppose to appear on the AMT field but it didn't. Any help? ...
3
by: judy.j.miller | last post by:
Does anyone know why i can't access a form element value using dot notation in firefox, when i'm in a function. Works ok in the body. I'm trying to do this: var FarTemp = faren.temp.value; I...
5
by: Paul Brettschneider | last post by:
Hello, I have a global static array of structs and want to access a given element using an identifier. I don't want to use the element subscript, because it will change if I insert elements...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.