SAX1—Simple API for XML Version 1

What is the Simple API for XML (SAX)? SAX provides an event-based API to retrieve (that is, to parse) data from an XML document. What is the data in an XML document? Depending on the task at hand, you may need to extract an element name, the character data inside an element, an attribute associated with a particular element, or all the above. The SAX API is implemented by a large number of XML parsers, including Apache Xerces, MSXML from Microsoft, and the Oracle XML Parser.

SAX1 Event Handling

How does the event handling inside a SAX processor work? The XML document is read sequentially (line by line), and the event-driven SAX processor calls a predefined subroutine (called an event handler in this ...

Get XML and Perl now with O’Reilly online learning.

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