Discussion in 'ASP General' started by John Smith, Mar 24, 2007.

  1. John Smith

    John Smith Guest


    I'm trying to read a moreover news feed and then store that information in a
    database. The problem that I am having is with reading the feed from the
    script. Is this the correct way to read a feed over http rather than an XML
    file ? Is there an easier way to handle dumping XML info directly into a
    database ?



    Script :

    Dim strtitle,strlink,strdescription,strguid,strpubDate,strsource
    Dim xml,xmlURL
    Set xml = Server.CreateObject("Microsoft.XMLDOM")
    xml.setProperty "ServerHTTPRequest", true
    xml.async = False
    xml.load (xmlURL)
    Dim NodeList
    Set NodeList = xml.documentElement.selectNodes("item")
    Dim Node
    For Each Node In NodeList
    strtitle = Node.selectSingleNode("title").Text
    strlink = Node.selectSingleNode("link").Text
    strdescription = Node.selectSingleNode("description").Text
    strguid = Node.selectSingleNode("guid").Text
    strpubDate = Node.selectSingleNode("pubDate").Text
    strsource = Node.selectSingleNode("source").Text

    'See if anything was read properly


    XML layout from feed :

    <rss version="2.0">
    Moreover Technologies
    Moreover Technologies
    <title>Moreover Technologies</title>
    Moreover Technologies
    <title>Sponsored Link</title>
    Ad - Over 85 locations and online programs available. Request free info.
    <guid isPermaLink="false">ad20070323120000</guid>
    <pubDate>Fri, 23 Mar 2007 14:31:00 GMT</pubDate>
    John Smith, Mar 24, 2007
    1. Advertisements

  2. michal

    michal Guest

    hi john, are you still strugling with getting the feed to work? i have
    written a class which reads feeds .. just let me know if you still
    need it.
    michal, Mar 28, 2007
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page