Ask a Question related to ASP, Design and Development.

  1. #1

    Default asp and rss feeds

    Hi there
    I am trying to create a newsfeed on my website. I used the following code
    on my website which I found somewhere. I then placed the call to this code
    in my web document. It does not appear to work. Am I missing something???
    Thanks Kez.

    Function getXML(sourceFile)
    dim styleFile
    dim source, style
    styleFile = Server.MapPath("news.xsl")

    Dim xmlhttp
    Set xmlhttp = Server.CreateObject("Microsoft.XMLHTTP")
    xmlhttp.Open "GET", sourceFile, false
    xmlhttp.Send

    set source = Server.CreateObject("Microsoft.XMLDOM")
    source.async = false
    source.loadxml(xmlhttp.ResponseText)

    set style = Server.CreateObject("Microsoft.XMLDOM")
    style.async = false
    style.load(styleFile)

    getXML = source.transformNode(style)
    set source = nothing
    set style = nothing
    End Function
    %>
    <html>





    Kez Bates Guest

  2. Similar Questions and Discussions

    1. RSS Feeds
      I sometimes use my yahoo mail account and have notice a news feed that apears in the inbox area. It is an RSS feed. I don't have to subscribe - it...
    2. Pieces of RSS Feeds
      I want to take pieces of an RSS feed and place them in a flash file that i would create. The RSS Feed I have is boring with no style or colors so I...
    3. Video Feeds
      Hello, Is there a way to put a live video feed (or just video) through a website by specifing the video source whether it is a digital video...
    4. Parsing RDF Feeds
      Hi all, I know this is a respost from alt.comp.lang.coldfusion, but I figure someone here might be of help too: I have here a rdf document at...
    5. PHP XML FEEDS & MYSQL
      I am looking for a simple script will take an xml feed from a URL, then upload the information to mysql database. Any ideas Please reply to...
  3. #2

    Default Re: asp and rss feeds

    Make sure the object is installed on the server. I have seen this
    happen when the XMLHTTP object isn't installed it just does nothing.

    hth,
    Andrew
    >Hi there
    >I am trying to create a newsfeed on my website. I >used the following
    code
    >on my website which I found somewhere. I then >placed the call to this
    code
    >in my web document. It does not appear to work. Am >I missing
    something???
    >Thanks Kez.
    >
    >Function getXML(sourceFile)
    >dim styleFile
    >dim source, style
    >styleFile = Server.MapPath("news.xsl")
    >
    >Dim xmlhttp
    >Set xmlhttp = >Server.CreateObject("Microsoft.XMLHTTP")
    >xmlhttp.Open "GET", sourceFile, false
    >xmlhttp.Send
    >
    >set source = >Server.CreateObject("Microsoft.XMLDOM")
    >source.async = false
    >source.loadxml(xmlhttp.ResponseText)
    >
    >set style = >Server.CreateObject("Microsoft.XMLDOM")
    >style.async = false
    >style.load(styleFile)
    >
    >getXML = source.transformNode(style)
    >set source = nothing
    >set style = nothing
    >End Function
    >%>
    ><html>
    * * * Sent via DevBuilder [url]http://www.devbuilder.org[/url] * * *
    Developer Resources for High End Developers.
    Andrew Durstewitz Guest

  4. #3

    Default Re: asp and rss feeds

    Oh, wait ... you're doing this on the server (duhhh!). You need to use the
    ServerXMLHTTPRequest object, not the client-side XMLHTTPRequest object.

    Bob Barrows

    Kez Bates wrote:
    > Hi there
    > I am trying to create a newsfeed on my website. I used the following
    > code on my website which I found somewhere. I then placed the call
    > to this code in my web document. It does not appear to work. Am I
    > missing something??? Thanks Kez.
    >
    > Function getXML(sourceFile)
    > dim styleFile
    > dim source, style
    > styleFile = Server.MapPath("news.xsl")
    >
    > Dim xmlhttp
    > Set xmlhttp = Server.CreateObject("Microsoft.XMLHTTP")
    > xmlhttp.Open "GET", sourceFile, false
    > xmlhttp.Send
    >
    > set source = Server.CreateObject("Microsoft.XMLDOM")
    > source.async = false
    > source.loadxml(xmlhttp.ResponseText)
    >
    > set style = Server.CreateObject("Microsoft.XMLDOM")
    > style.async = false
    > style.load(styleFile)
    >
    > getXML = source.transformNode(style)
    > set source = nothing
    > set style = nothing
    > End Function
    > %>
    > <html>




    Bob Barrows Guest

  5. #4

    Default Re: asp and rss feeds

    Yes, I did realise that I hadn't put in my actual error, but I had already
    submitted my question.

    I am currently getting the following...
    The stylesheet does not contain a document element. The stylesheet may be
    empty, or it may not be a well-formed XML document.

    Tried your serverside object and it comes up with
    error 'ASP 0177 : 800401f3'
    Server.CreateObject Failed
    Invalid ProgID.

    Which microsofts solution to is, and I quote... "You can ignore this error
    message. It will go away. "

    Hope you can shed some light for me.

    Thanks Kez

    "Bob Barrows" <reb_01501@yahoo.com> wrote in message
    news:ePS3jLqVDHA.2272@TK2MSFTNGP11.phx.gbl...
    > What do you mean by "does not appear to work"?
    >
    > If I brought you my toaster and asked you to fix it, what would be your
    > first question to me? :-)
    >
    > Bob Barrows
    >
    > Kez Bates wrote:
    > > Hi there
    > > I am trying to create a newsfeed on my website. I used the following
    > > code on my website which I found somewhere. I then placed the call
    > > to this code in my web document. It does not appear to work. Am I
    > > missing something??? Thanks Kez.
    > >
    > > Function getXML(sourceFile)
    > > dim styleFile
    > > dim source, style
    > > styleFile = Server.MapPath("news.xsl")
    > >
    > > Dim xmlhttp
    > > Set xmlhttp = Server.CreateObject("Microsoft.XMLHTTP")
    > > xmlhttp.Open "GET", sourceFile, false
    > > xmlhttp.Send
    > >
    > > set source = Server.CreateObject("Microsoft.XMLDOM")
    > > source.async = false
    > > source.loadxml(xmlhttp.ResponseText)
    > >
    > > set style = Server.CreateObject("Microsoft.XMLDOM")
    > > style.async = false
    > > style.load(styleFile)
    > >
    > > getXML = source.transformNode(style)
    > > set source = nothing
    > > set style = nothing
    > > End Function
    > > %>
    > > <html>
    >
    >
    >

    Kez Bates Guest

  6. #5

    Default Re: asp and rss feeds

    Kez Bates wrote:
    > Yes, I did realise that I hadn't put in my actual error, but I had
    > already submitted my question.
    >
    > I am currently getting the following...
    > The stylesheet does not contain a document element. The stylesheet
    > may be empty, or it may not be a well-formed XML document.
    This sounds like a problem with the xsl document. You might try posting it
    at microsoft.public.xsl. I'm not an xsl user.
    >
    > Tried your serverside object and it comes up with
    > error 'ASP 0177 : 800401f3'
    > Server.CreateObject Failed
    > Invalid ProgID.
    >
    Oops, I gave you the wrong name for the object: it should have been
    ServerXMLHTTP. The correct instantiation is "MSXML2.ServerXMLHTTP"

    Here is an example of its use: [url]http://www.aspfaq.com/show.asp?id=2173[/url]
    > Which microsofts solution to is, and I quote... "You can ignore this
    > error message. It will go away. "
    >
    Can you tell me where this "solution" comes from?

    Bob Barrows
    > Hope you can shed some light for me.
    >
    > Thanks Kez
    >
    > "Bob Barrows" <reb_01501@yahoo.com> wrote in message
    > news:ePS3jLqVDHA.2272@TK2MSFTNGP11.phx.gbl...
    >> What do you mean by "does not appear to work"?
    >>
    >> If I brought you my toaster and asked you to fix it, what would be
    >> your first question to me? :-)
    >>
    >> Bob Barrows
    >>
    >> Kez Bates wrote:
    >>> Hi there
    >>> I am trying to create a newsfeed on my website. I used the
    >>> following code on my website which I found somewhere. I then
    >>> placed the call to this code in my web document. It does not
    >>> appear to work. Am I missing something??? Thanks Kez.
    >>>
    >>> Function getXML(sourceFile)
    >>> dim styleFile
    >>> dim source, style
    >>> styleFile = Server.MapPath("news.xsl")
    >>>
    >>> Dim xmlhttp
    >>> Set xmlhttp = Server.CreateObject("Microsoft.XMLHTTP")
    >>> xmlhttp.Open "GET", sourceFile, false
    >>> xmlhttp.Send
    >>>
    >>> set source = Server.CreateObject("Microsoft.XMLDOM")
    >>> source.async = false
    >>> source.loadxml(xmlhttp.ResponseText)
    >>>
    >>> set style = Server.CreateObject("Microsoft.XMLDOM")
    >>> style.async = false
    >>> style.load(styleFile)
    >>>
    >>> getXML = source.transformNode(style)
    >>> set source = nothing
    >>> set style = nothing
    >>> End Function
    >>> %>
    >>> <html>


    Bob Barrows Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139