O'Reilly logo

PHP 5 Power Programming by Derick Rethans, Stig Sæther Bakken, Andi Gutmans

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required