473,761 Members | 10,365 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to retrieve RSS feed from blogger?

63 New Member
Here's the code for the index.xml file on the blogger

Expand|Select|Wrap|Line Numbers
  1.  
  2. <?xml version="1.0" encoding="<$MTPublishCharset$>"?>
  3. <rss version="2.0">
  4.    <channel>
  5.       <title><$MTBlogName remove_html="1" encode_xml="1"$></title>
  6.       <link><$MTBlogURL$></link>
  7.       <description><$MTBlogDescription remove_html="1" encode_xml="1"$></description>
  8.       <language><$MTBlogLanguage ietf="1"$></language>
  9.       <copyright>Copyright <$MTDate format="%Y"$></copyright>
  10.       <lastBuildDate><MTEntries lastn="1"><$MTEntryDate format_name="rfc822"$></MTEntries></lastBuildDate>
  11.       <generator>http://www.sixapart.com/movabletype/?v=<$MTVersion$></generator>
  12.       <docs>http://blogs.law.harvard.edu/tech/rss</docs> 
  13.  
  14.       <MTEntries lastn="15">
  15.       <item>
  16.          <title><$MTEntryTitle remove_html="1" encode_xml="1"$></title>
  17.          <description><$MTEntryBody encode_xml="1"$></description>
  18.          <link><$MTEntryPermalink encode_xml="1"$></link>
  19.          <guid><$MTEntryPermalink encode_xml="1"$></guid>
  20.          <category><$MTEntryCategory remove_html="1" encode_xml="1"$></category>
  21.          <pubDate><$MTEntryDate format_name="rfc822"$></pubDate>
  22.       </item>
  23.       </MTEntries>
  24.    </channel>
  25. </rss>
  26.  
Here's my javascript file which returns an allert that it could not handle the file -- I'm sure it has to do with me not defining what variables that the blogger is returning, but is there a way to handle such variables?

Expand|Select|Wrap|Line Numbers
  1.  
  2. var channelvar=xml_doc.getElementsByTagName('channel');
  3. var titlevar=xml_doc.getElementsByTagName('title');
  4. var linkvar=xml_doc.getElementsByTagName('link');
  5. var descriptionvar=xml_doc.getElementsByTagName('description');
  6. var languagevar=xml_doc.getElementsByTagName('language');
  7. var copyrightvar=xml_doc.getElementsByTagName('copyright');
  8. var lastBuildDatevar=xml_doc.getElementsByTagName('lastBuildDate');
  9. var generatorvar=xml_doc.getElementsByTagName('generator');
  10. var docsvar=xml_doc.getElementsByTagName('docs');
  11. var guidvar=xml_doc.getElementsByTagName('guid');
  12. var categoryvar=xml_doc.getElementsByTagName('category');
  13. var pubDatevar=xml_doc.getElementsByTagName('pubDate');
  14.  
  15.  
  16. for (i=0;i<channelvar.length;i++)
  17.   {
  18.   if (channelvar[i].nodeType==1)
  19.     { 
  20. document.writeln(titlevar[i].childNodes[0].nodeValue + '<br>');
  21. document.writeln("<a href='" + linkvar[i].childNodes[0].nodeValue + "' target=_blank>" + linkvar[i].childNodes[0].nodeValue + "</a><br>");
  22. document.writeln(descriptionvar[i].childNodes[0].nodeValue + '<br>');
  23. document.writeln(languagevar[i].childNodes[0].nodeValue);
  24. document.writeln(copyrightvar[i].childNodes[0].nodeValue);
  25. document.writeln(lastBuildDatevar[i].childNodes[0].nodeValue);
  26. document.writeln(generatorvar[i].childNodes[0].nodeValue);
  27. document.writeln(docsvar[i].childNodes[0].nodeValue);
  28. document.writeln(guidvar[i].childNodes[0].nodeValue);
  29. document.writeln(categoryvar[i].childNodes[0].nodeValue);
  30. document.writeln(pubDatevar[i].childNodes[0].nodeValue + "<br>&nbsp;<br>");
  31.     }
  32.   }
  33.  
  34.  
As usual, thanks in advance for any help :-)
May 20 '07 #1
1 2183
Dököll
2,364 Recognized Expert Top Contributor
Hi!

I am not sure why it is not doing what you intended it to. Here's an RSS Feed validator site: http://www.feedvalidator.org/

Give it a go, see what comes up, ok!
Jul 4 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

15
2341
by: Brady Love | last post by:
I am currently working an an app that will post and edit blogs on blogger. Right now I have it so I can recive a list of the blogs and the content of those blogs using Atomizer. This is my first program where I am accessing data over the net.When I go to retrieve the list of blogs my program acts like it is locked up/frozen for a few seconds and then when it is done it goes back to normal. Does anyone know how I would get rid of the...
2
1270
by: Pete.Cloth | last post by:
Can someone please help me with this. I need to align a picture onto a "blogger"? HELP!
3
2812
by: Hymer | last post by:
Hello, I have a blog with link information at the bottom of each article. I just added a text-to-speech link from Talkr where you can "Listen to this article." Everything is working fine from the blog but the "Listen to this article" link is not showing on my RSS Feed. The RSS Feed goes through FeedBurner which is set for Full Article and SmartCast is on. The feed does validate with two warnings generated by server side HTML .
6
3639
by: Jim | last post by:
I'm a newbie so I'm probably doing something simple and dumb but I just can't get Blogger to accept a JavaScript for/next loop. Here's what I've tried <Script Language='JavaScript> { for (var i = 0; i < 16; i++) { Code to do stuff here with checkboxes. But, no matter what I put
0
9531
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9345
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9957
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9905
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9775
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8780
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5229
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3881
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3456
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.