473,394 Members | 1,696 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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>

Jul 19 '05 #1
4 6082
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 codeon my website which I found somewhere. I then >placed the call to this codein 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 http://www.devbuilder.org * * *
Developer Resources for High End Developers.
Jul 19 '05 #2
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>


Jul 19 '05 #3
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" <re*******@yahoo.com> wrote in message
news:eP**************@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>


Jul 19 '05 #4
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: http://www.aspfaq.com/show.asp?id=2173
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" <re*******@yahoo.com> wrote in message
news:eP**************@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>


Jul 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: the_ainbinders | last post by:
Anything like this around anywhere? Need to be able to input RSS information for several feeds and have it create an OMPL file. TIA, Rob
6
by: plazma_41 | last post by:
Are there any uses for rss feeds on commercial websites selling products/services? Yes! I've just realized that eMaximarket Auctions ( http://www.emaximarket.com ) provides RSS feeds. For...
5
by: Mike Mella | last post by:
If I make an RSS feed of my site, am I expected to build and later update the RSS (XML) data by hand as I would any other webpage, or is there some process by which updates to a site are...
1
by: richards1052 | last post by:
I am setting up a forum website at which I plan to set up a news aggregator to pick up news headlines about the Mideast. But I've only been able to find a few news resources that have specific...
3
by: Mike | last post by:
I want to create a ticker type app that consume RSS feeds from several sites, where can i find some informaton or code snippets now how to consume the RSS feeds and display the data?
2
by: Patrick Olurotimi Ige | last post by:
I wanto to incorporate some feeds like weather,news and humor(funny stuff) Any links where i can get related feeds on the WEB? Thx *** Sent via Developersdex http://www.developersdex.com ***
0
by: jmwatte | last post by:
OK... 2 RSS feeds ... "http://feeds.feedburner.com/brainyquote/QUOTENA" "http://feeds.feedburner.com/qotd" Now I build a RSS reader in C#Express(did several of them including the starterkit)...
2
by: dkode | last post by:
I built an asp.net usercontrol that consumes rss feeds that I specify the url for. Some of them (MVP blogs, google news) consumes the feeds just fine. and other times (75%) it chokes on...
5
by: Shawn | last post by:
Hi, I want to understand and follow RSS feed because many web pages provide RSS feed for updated new data(e.g. http://www.weather.gov/rss/). But I never get how to use it. The link below suppose...
1
by: Rama Jayapal | last post by:
hi i am developing a web application where i have to read multiple XML feeds amd store their values to database but i require the same type of fields from multiple XML feeds like for...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.