From e90282da1ceda0f76655a2ee75f8bd8cb13e1c5c Mon Sep 17 00:00:00 2001 From: orbiter Date: Tue, 22 Apr 2008 23:09:24 +0000 Subject: [PATCH] added experimental javascript terminal for rss feeds (not used yet anywhere yet, expect the worst) .. possibly to be used as content for iframes within monitoring pages not ready yet! git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4727 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/js/rss2.js | 167 ++++++++++++++++++++++++++++++++++++++++ htroot/rssTerminal.html | 151 ++++++++++++++++++++++++++++++++++++ 2 files changed, 318 insertions(+) create mode 100755 htroot/js/rss2.js create mode 100755 htroot/rssTerminal.html diff --git a/htroot/js/rss2.js b/htroot/js/rss2.js new file mode 100755 index 000000000..68387d648 --- /dev/null +++ b/htroot/js/rss2.js @@ -0,0 +1,167 @@ +// parser for rss2 + +function RSS2Enclosure(encElement) { + if (encElement == null) { + this.url = null; + this.length = null; + this.type = null; + } else { + this.url = encElement.getAttribute("url"); + this.length = encElement.getAttribute("length"); + this.type = encElement.getAttribute("type"); + } +} + +function RSS2Guid(guidElement) { + if (guidElement == null) { + this.isPermaLink = null; + this.value = null; + } else { + this.isPermaLink = guidElement.getAttribute("isPermaLink"); + this.value = guidElement.childNodes[0].nodeValue; + } +} + +function RSS2Source(souElement) { + if (souElement == null) { + this.url = null; + this.value = null; + } else { + this.url = souElement.getAttribute("url"); + this.value = souElement.childNodes[0].nodeValue; + } +} + +function RSS2Item(itemxml) { + //required + this.title; + this.link; + this.description; + + //optional vars + this.author; + this.comments; + this.pubDate; + + //optional objects + this.category; + this.enclosure; + this.guid; + this.source; + + var properties = new Array("title", "link", "description", "author", "comments", "pubDate"); + //var properties = new Array("title", "link"); + var tmpElement = null; + for (var i=0; i + + + +rss terminal + + + + + + + + +
+
+
+
+
+ + + + +