Skip to Main Content
XML and PHP
book

XML and PHP

by Vikram Vaswani
June 2002
Intermediate to advanced content levelIntermediate to advanced
384 pages
7h 53m
English
Sams
Content preview from XML and PHP

PHP and SAX

PHP 4.0 comes with a very capable SAX parser based on the expat library. Created by James Clark, the expat library is a fast, robust SAX implementation that provides XML parsing capabilities to a number of open-source projects, including the Mozilla browser (http://www.mozilla.org/).

If you’re using a stock PHP binary, it’s quite likely that you’ll need to recompile PHP to add support for this library to your PHP build. Detailed instructions for accomplishing this are available in Appendix A, “Recompiling PHP to Add XML Support.”

A Simple Example

You can do a number of complex things with a SAX parser; however, I’ll begin with something simple to illustrate just how it all fits together. Let’s go back to the previous XML document ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

PHP Development Tool Essentials

PHP Development Tool Essentials

Chad Russell
PHP Web Services

PHP Web Services

Lorna Jane Mitchell

Publisher Resources

ISBN: 0735712271Purchase book