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 ...
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.
Read now
Unlock full access