Reading XML with PHP, Extracting the Data

In the first part of this tutorial, we designed an XML file that contained categories and resources for reference links. In this part, we will use PHP to extract the information from the XML document and generate an HTML file from the information. Continue reading


Reading XML with PHP, The XML Document

I have found many situations where being able to read the information in a XML/RSS file has come in handy. For example, putting a block on a page with the latest entries from a blog. Since XML files are basically structured flat databases, I use them sometimes for short collections that do not require security.

XML files are not difficult. You don’t need a fancy, expensive program to generate them, and PHP has functions built in to read and manipulate them. Continue reading