Mar
Sat
13
anonym
  • 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


  • The database we're using is Microsoft SQL Server 2000


  • 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


  • 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.


  • Great! mathtalk-ga, We just need to have it stored as a "blob". No need for searching. Thanks -Matt


  • 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


  • 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







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about XML feed automatically inserted into SQL database using ASP or ASP.NET , Please add it free.
    • edit