8.5. PEAR

In some cases, none of the previous techniques may be appropriate. For example, the DOM XML extension might not be available, or you might want to parse something very specific and don't want to build a parser yourself. PEAR contains classes that deal with parsing XML, which might be useful. We'll cover two of them: XML_Tree and XML_RSS. XML_Tree is useful for building XML documents through a tree when the DOM XML extension is not available or when you want to build a document fast without too many features. XML_RSScan parse RSS files. RSS files are XML documents describing the last few items of (for example) a news site.

8.5.1. XML_Tree

Building an XML document with XML_Tree is quite easy, and can be done when the DOM XML extension ...

Get PHP 5 Power Programming now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.