Tom Jackson

Navigation

Skip navigation.

Search

Site navigation

Email conversation

FromTom Jackson
ToMe
SubjectRSS feed without a web server? If even possible?
Date4 April 2007 22:43
Mark,

I saw the line saying, in order to not use all your bandwidth, to put
the RSS converter on our own site & use it.  Having trouble with running
it in a semi-offline way to test it - what I'm trying:

I first came across [URL] and so needed an RSS converter

I came across 
http://www.howtocreate.co.uk/tutorials/jsexamples/rss.html, used it, and
it worked beautifully.

Saved your rss.zip archive, extracted all the files, ran rss.html and
tried it with that same link and no dice, says it does not recognize it
as a valid RSS format.  I'm guessing this is because I'm not using it
inconjuction with a web server/PHP/ASP, etc., just standalone.  Is the
code really HTTP/server-based, or does it have to be if it is?  Can't it
be ran as client-side only/offline?  Just seems like more work went into
making it more complicated than it needed to be, if all it is is a
script.  Could it be re-written to work in a non-web server way?  

Sincerely,

Tom Jackson
FromMe
ToTom Jackson
SubjectRe: RSS feed without a web server? If even possible?
Date6 April 2007 18:42
Tom,

> I'm guessing this is because I'm not using it
> inconjuction with a web server/PHP/ASP

Yep.

> Is the code really HTTP/server-based, or does it have to be if it is?

If you are loading a feed from another Web site, then yes, it has to be
done through your own server to allow for the JavaSript domain security
policy.

> Can't it be ran as client-side only/offline?

Yes. But to avoid many browser bugs or features, it needs a slightly
modified file, and cannot handle the normal RSS/Atom.

You would need to change the URL that it loads to point directly to your
local file instead of using the PHP/ASP script. Then you would need to make
the same changes to your RSS/Atom XML file as the PHP script would make:

Remove any XML stylesheet links that are already in the feed - eg.
<?xml-stylesheet type="text/css" href="foo.css" ?>
Add a link to an empty XML stylesheet:
<?xml-stylesheet type="text/css" href="empty.css" ?>
before the first occurance of one of these tags:
<rss <atom <opml <outlineDocument
Replace all occurrences of <link ...> and </link> with <fixlink ...> and
</fixlink> respectively.
Replace all occurrences of <image ...> and </image> with <fiximage ...> and
</fiximage> respectively.
Replace all occurrences of <rss ...> and </rss> with <rssSpoof ...> and
</rssSpoof> respectively.
Replace all occurrences of <feed ...> and </feed> with <atomSpoof ...> and
</atomSpoof> respectively.


Mark 'Tarquin' Wilton-Jones - author of http://www.howtocreate.co.uk/
FromTom Jackson
ToMe
SubjectRe: RSS feed without a web server? If even possible?
Date9 April 2007 16:07
Attachmentsdemo files
Mark,

Unfortunately, following your advice didn't yield results.... I'm
attaching the HTML version of your RSS converter, as well as the XML
file I was attempting to convert.

Even if an RSS feed can't be rendered in this way, is there a similar
converter that will render XML?  That is really what I need.  I just
assumed since it worked with the online version of this XML file that it
could be made to work offline, too.  I do appreciate all your help...
just trying to get tools that'll help me in this new .NET developer
world I'm about to start...  Thanks for everything.  

Please make your reply to [email address] if it's after today (Monday,
the 9th).

Sincerely,
Tom Jackson
FromMe
ToTom Jackson
SubjectRe: RSS feed without a web server? If even possible?
Date14 April 2007 10:44
Tom,

> Unfortunately, following your advice didn't yield results.... I'm
> attaching the HTML version of your RSS converter, as well as the XML
> file I was attempting to convert.

I see why. Your XML file uses one of the formats not supported by my reader.
The rdf:foo based approach.

> Even if an RSS feed can't be rendered in this way, is there a similar
> converter that will render XML?

You just want an XML tree output? If so, you can either use Opera, and
install my XML Tree user JavaScript - just tell it not to subscribe to the
feed when you open it:
http://www.howtocreate.co.uk/operaStuff/userJavaScript.html#xmltree
Or you can use an old version of Firefox or IE, that do not support RSS.

I do not know of any dedicated scripts to do this with XML files loaded via
XMLHttpRequest, although it would certainly be possible - probably by some
very detailed adaptation of my XML Tree script.
This site was created by Mark "Tarquin" Wilton-Jones.
Don't click this link unless you want to be banned from our site.