Skip to Content
Special Edition Using XML, Second Edition
book

Special Edition Using XML, Second Edition

by - et al. David Gulbransen
July 2002
Intermediate to advanced
864 pages
22h 32m
English
Que
Content preview from Special Edition Using XML, Second Edition

SAX Overview

Unlike the DOM, SAX is not an object model. A SAX parser represents a document using events initiated sequentially while parsing the document tags. For example, the portion of the XML document demonstrated in Listing 15.1 will translate into the following sequence of events:

  • startElement

  • characters

  • endElement

Listing 15.1. Sample XML Document
...
<my-element>
    this is sample text
</my-element>
...
					

SAX Parsers

SAX is designed in such a way that it is very easy to use the API with different implementations of parsers. The only requirement is that parsers should implement a set of standard interfaces—otherwise, there is considerable freedom in implementing SAX-compliant parsers.

Currently, there are several implementations of SAX parsers ...

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

XML Pocket Reference, 3rd Edition

XML Pocket Reference, 3rd Edition

Simon St. Laurent, Michael Fitzgerald
Essential XML: Beyond Markup

Essential XML: Beyond Markup

Don Box, Aaron Skonnard, John Lam

Publisher Resources

ISBN: 078972748XPurchase book