Summary

That concludes this tour of PHP’s SAX functions. In this chapter, you got your first taste of PHP’s XML functions by learning how to implement a generic XML processor in PHP and to use callback functions to handle the different events caught by the SAX parser.You also learned how to modify specific aspects of parser behavior, handle errors gracefully, and create native data structures from XML documents. Finally, you road-tested the XML processor with two composite examples, combining your knowledge of all these techniques to create simple XML applications to format and present XML data in HTML.

In the next chapter, I will be exploring an alternative technique of XML processing—using the tree-based model discussed at the beginning of ...

Get XML and PHP now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.