Home arrow XML arrow Creating an RSS Reader Application

Creating an RSS Reader Application

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.

TABLE OF CONTENTS:
  1. Creating an RSS Reader Application
  2. Code
  3. Parsing the RSS document
  4. Creating an enhanced RSS document
By: Jacques Noah
Rating: starstarstarstarstar / 14
February 20, 2007

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

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
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

XML ARTICLES

- Google Docs and Xpath Data Functions
- Flex Array Collection Sort and Filtering
- The Flex Tree Control
- Flex List Controls
- Working with Flex and Datagrids
- 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...

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: