Advanced Features of SAX

The SAX API has some features that your application is less likely to need than the preceding features. However, they are worth discussing anyway.

Using an EntityResolver for External Parsed Entities

EntityResolver is probably the most important advanced capability of the SAX API. XML documents may be built out of more than one entity. That is, in addition to the main file, they may also incorporate other components. This is frequently done with DTDs, referring to external declarations, and it may be done with documents that have their content split between several other files. An example is building a book out of chapters. Each chapter could be in a file by itself, accessed as an external entity. Different authors ...

Get XML Unleashed 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.