Google Answers Logo
View Question
 
Q: XML feed automatically inserted into SQL database using ASP or ASP.NET ( No Answer,   2 Comments )
Question  
Subject: XML feed automatically inserted into SQL database using ASP or ASP.NET
Category: Computers > Programming
Asked by: mkbriney-ga
List Price: $25.00
Posted: 09 Jan 2004 13:56 PST
Expires: 08 Feb 2004 13:56 PST
Question ID: 294855
I have an XML feed that is updated perioidcally throughout the day:
http://api.yellowbrix.com/api/?service=headlines&method=xml&id=aiada&password=oiiraj&link_type=storyapi&category=Foreign+Automotive&enabletext=1&summaryon=1&define_company=1&define_caption=1

I'm trying to find some type of example script or documentation to
create an ASP script or an ASP.NET script that will read the feed,
gather the information and then insert the new articles into an SQL
database every 15 minutes.

Some example code is perfered, but if documentation is the only thing
that exists that will work as well.

Thanks

Request for Question Clarification by mathtalk-ga on 09 Jan 2004 14:53 PST
Hi, mkbriney-ga:

It would be helpful if you can Clarify what database you will be
targeting.  Most of the popular database engines have support for XML,
but these vary considerably in the details.  Of course you may have a
requirement to do something DBMS platform independent, and it would be
good to know if that is so.

regards, mathtalk-ga

Clarification of Question by mkbriney-ga on 12 Jan 2004 06:00 PST
The database we're using is Microsoft SQL Server 2000

Request for Question Clarification by mathtalk-ga on 12 Jan 2004 15:09 PST
Hi, mkbriney-ga:

Cool, that's what I'm running.  Now, do you want the XML document
stored as a "BLOB", ie. just as a text field, or will you require some
conversion of the XML fields into table columns, e.g. for the purpose
of searching or transformations.

Obviously it's simpler just to store the entire XML document in one
text field and be done with it, if that would serve your purpose.

regards, mathtalk-ga

Clarification of Question by mkbriney-ga on 13 Jan 2004 05:42 PST
Great! mathtalk-ga,

We just need to have it stored as a "blob".  No need for searching.

Thanks
-Matt
Answer  
There is no answer at this time.

Comments  
Subject: Re: XML feed automatically inserted into SQL database using ASP or ASP.NET
From: zigamorph-ga on 10 Jan 2004 17:06 PST
 
One thing that you have to remember is that inorder to have something
run every 15 minutes it has to be always running.  I would suggest
using a Windows Service inorder to do this.  Since with ASP.Net or ASP
the code is only executed when somebody accesses the page.

As far as taking a news feed and inserting it into a database you have
to do the following.  Have three tables in the database one called
Story, one called Summary, one called Company.  Then read in the page
using the XmlDocument class.  After you do this parsing through the
feed should be easy.  All that you have to do is go though each Node
and add it into the corresponding datafield in the database.
Subject: Re: XML feed automatically inserted into SQL database using ASP or ASP.NET
From: rainbowss-ga on 19 Jan 2004 20:32 PST
 
This will be the answer:

In .NET you should add a refrence call XMLBULKINSERT. this class has
property and methode which you fill and call to insert/add your xml
data to SQL Database.

You must build a schema file ( a mapping XML file )as well which
contains mapping of tags from your XML data file to column name on SQL
server.

If this sounds your answer, please reply and I'll bring the code as well.

Regards, Rainbowss

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy