Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - RSS Into Database
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

RSS Into Database

 Post Reply Post Reply
Author
rhysa View Drop Down
Newbie
Newbie


Joined: 02 September 2003
Location: United States
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote rhysa Quote  Post ReplyReply Direct Link To This Post Topic: RSS Into Database
    Posted: 02 September 2003 at 8:42am

Hi everyone,

I've starting playing with XML and I've seen some great examples to parse XML and RSS documents to display the headlines on a table. However, I'm stuck with something : I'd like to know how to insert the RSS items into a database.

I mean, most of the samples just take the RSS Newsfeed and parse it through an XSL to display it, but what I want to achieve is to take the <TITLE>, <LINK> and <DESCRIPTION> items from the newsfeed and insert them into a database table (title,link, description).

I'm really stuck  and I'm new here
Any help would be greatly appreaciated

Thanks!

Back to Top
MorningZ View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 May 2002
Location: United States
Status: Offline
Points: 1793
Post Options Post Options   Thanks (0) Thanks(0)   Quote MorningZ Quote  Post ReplyReply Direct Link To This Post Posted: 02 September 2003 at 11:45am

first off.. one of the purposes of RSS is to avoid database interaction

none the less.. all you would do it work through the XML document and instead of displaying it, build a SQL statement
http://forums.webwiz.net/forum_posts.asp?TID=5360&PN=1

Contribute to the working anarchy we fondly call the Internet
Back to Top
rhysa View Drop Down
Newbie
Newbie


Joined: 02 September 2003
Location: United States
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote rhysa Quote  Post ReplyReply Direct Link To This Post Posted: 02 September 2003 at 12:36pm
Originally posted by MorningZ MorningZ wrote:

first off.. one of the purposes of RSS is to avoid database interaction

Yes, you are right.
But in this case, I need to save that information syndicated from an external source into a database.

I apprecaite your sample, however what it does is a transformation to display it directly on the web page.

What I'd really like to see is a sample that walks the RSS Newsfeed taking each of the required items (title, description and link) and placing it into variables (so that a sql statement could be built later)

This is the first time that I approach this technology (XML) and I'm not sure of how to achieve what I'm trying

 

Back to Top
MorningZ View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 May 2002
Location: United States
Status: Offline
Points: 1793
Post Options Post Options   Thanks (0) Thanks(0)   Quote MorningZ Quote  Post ReplyReply Direct Link To This Post Posted: 02 September 2003 at 12:49pm

the link and sample i provided above has nothing to do with XML per se....

but as said in my reply (and echoed in the comment: "I apprecaite your sample, however what it does is a transformation to display it directly on the web page").. so instead of Response.Write-ing the value, then save it in a variable or something and build up a SQL statement to do the database insert.... no one says you have to display the data gathered from the RSS document, that sample above is more or less code to be able to parse/process the XML document, displaying it is just the end of the road for it....

Contribute to the working anarchy we fondly call the Internet
Back to Top
rhysa View Drop Down
Newbie
Newbie


Joined: 02 September 2003
Location: United States
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote rhysa Quote  Post ReplyReply Direct Link To This Post Posted: 02 September 2003 at 1:07pm

Dear MorningZ, thanks a lot for helping me :

Originally posted by MorningZ MorningZ wrote:

 instead of Response.Write-ing the value, then save it in a variable or something and build up a SQL statement to do the database insert

after looking at your code, there's only one response.write which displays the full HTML once the XML is transformed. It is not taking each element (which is what i want to achieve).

What I'm currently looking, is something like this :

  1. Open the XML document (URL)
  2. Get the ITEMS nodes
  3. Walk through the ITEMS nodes like this (Loop or for each) :
    link=Link from the current node
    title=title from the current node
    description=descriptionfrom the current node

If you see, I'm taking the document and just selecting it's ITEMS and then taking some of its subnodes (specifically link,title,description) and storing them on a variable.

I'm not sure if I'm being clear.
Thanks for your patience


Back to Top
rhysa View Drop Down
Newbie
Newbie


Joined: 02 September 2003
Location: United States
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote rhysa Quote  Post ReplyReply Direct Link To This Post Posted: 04 September 2003 at 3:50pm

Any suggestions?

I'm going crazy with this and I don't seem to find a working sample

Back to Top
MorningZ View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 May 2002
Location: United States
Status: Offline
Points: 1793
Post Options Post Options   Thanks (0) Thanks(0)   Quote MorningZ Quote  Post ReplyReply Direct Link To This Post Posted: 04 September 2003 at 4:14pm

yeah, go learn the commands "selectNodes" and "selectSingleNode"

http://msdn.microsoft.com/library/default.asp?url=/library/e n-us/xmlsdk30/htm/xmmthselectnodes.asp

you seem to not have much interest in learning this yourself... not sure if you expect someone to code the whole thing for you

Contribute to the working anarchy we fondly call the Internet
Back to Top
rhysa View Drop Down
Newbie
Newbie


Joined: 02 September 2003
Location: United States
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote rhysa Quote  Post ReplyReply Direct Link To This Post Posted: 04 September 2003 at 4:39pm
Thanks for the harsh reply.
Rude but useful, I'll never ask anything here again
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.