Implementing the AJAX RSS Reader
In order for this exercise to function correctly, you need to enable XSL support in your PHP installation. Appendix A contains installation instructions that include XSL support.
In the exercise that will follow we will build our own AJAX-enabled RSS reader application. The main characteristics for the application are:
We’ll keep the application simple. The list of
feeds
will be hard-coded in a PHP file on the server.We’ll use XSLT to transform the RSS feed data into something that we can display to the visitor. In this chapter, the XSL transformation will be performed on the server side, using PHP code.
We’ll use the SimpleXML library to read the XML response from the news server. SimpleXML was introduced in PHP 5, and you can find its official documentation at http://php.net/simplexml. SimpleXML is an excellent library that can make reading XML sources much easier than using the DOM.
The application will look like Figure 9.2: