XML
  Home arrow XML arrow Creating an RSS Reader Application
Dev Shed Forums 
Administration  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Download TestComplete 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
XML

Creating an RSS Reader Application
By: Jacques Noah
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 7
    2007-02-20

    Table of Contents:
  • Creating an RSS Reader Application
  • Code
  • Parsing the RSS document
  • Creating an enhanced RSS document

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
     
    ADVERTISEMENT

    TestComplete™ automates software testing for a fraction of what the big guys charge. Easy functional and load testing for all Windows, .NET, Java and Web apps. Download a free trial now.

    Creating an RSS Reader Application
    (Page 1 of 4 )

    In the previous two articles we discussed how to read and build an RSS document with PHP. In this article we will create an application that uses the concepts discussed in the other two articles. So let’s go straight to the coding.

    The Application

    The layout of the application is going to be very simple: A navigation bar on the left and a display area in the center. The display area is were we are going to display all the output of the code. I've not used any CSS in this application. I've instead opted to use HTML formatting to keep things simple.

    As for the actual functioning of the application, we are going to use only one page to execute all the code. This is because it reduces the amount of processing power required to run the application. As a result, it makes program execution faster and reduces coding time.

    We are also going to create a few functions that will help us to run the script.  The functions are stored in a script called "functions.php" and need to be included in the page. In addition to the functions page, we will also need to include the xmlparser.php page, as this will help fulfill  one of the core aims of the application.

    When a user clicks on a link, that link will send an action variable to the page. The action variable will then be caught by the switch statement, which will in turn process it and compare its value against the conditions set within the case statements of the switch structure. This comparison, if matched, will activate the appropriate function which will use the display area to output the result. The aim of the application is to:

    • Read an RSS document
    • Create an RSS document

    The second link called "Create an RSS link" is more complicated to implement than the Read RSS document link. This is because there are two different versions of an RSS document and the application has to decide which path to take based on the selection that the user made. Various functions will display various forms to take input and will create an RSS document based on the input. All new RSS documents that are created by this application will be stored in the same directory where the application resides. With a little bit of code you can change the location in which the file should be stored. In the code section we will explore what each and every function does.

    When the "Read an RSS document" link is clicked the application simply calls the functions in the xmlparser.php page and then parses the RSS document.  The xml parser  was created in the first tutorial of the series. Please refer to it if you need to know how it works.

    More XML Articles
    More By Jacques Noah


       · Hope you enjoyed my article. Any comments are very welcome
     

       

    XML ARTICLES

    - How to Set Up Podcasting and Vodcasting
    - Creating an RSS Reader Application
    - Building an RSS File
    - An Introduction to XUL Part 6
    - An Introduction to XUL Part 5
    - An Introduction to XUL Part 4
    - An Introduction to XUL Part 3
    - An Introduction to XUL Part 2
    - An Introduction to XUL Part 1
    - XML Matters: Practical XML Data Design and M...
    - Practical XML Data Design and Manipulation f...
    - SimpleXML
    - XForms Basics, Part 3
    - XForms Basics, Part 2
    - XForms Basics




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway