O'Reilly logo

Java and XML, 3rd Edition by Brett McLaughlin, Justin Edelson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix 1. SAX Features and Properties

This appendix describes the SAX 2.0 standard features and properties. Although a vendor’s parsing software can add additional features and properties for vendor-specific functionality, this list represents the core set of functionality that any SAX 2.0-compliant parser implementation should support.

Tip

To be precise, these are drawn from the SAX 2.0.2 release 3. However, any SAX 2.x parser should provide these features and properties—or, at worst, recognize them and throw a SAXNotSupportedException.

Core Features

The core set of features supported by SAX 2.0 XMLReader implementations is listed here. These features can be set through setFeature(), and the value of a feature can be obtained through getFeature(). Any feature can be read-only or read/write; features also may be modifiable only when parsing is occurring, or only when parsing is not occurring. For more information on SAX features and properties, refer to Chapter 4.

External General Entity Processing

This feature tells a parser whether or not to process external general entities, such as:

 <!ENTITY copyright    SYSTEM "legal/copyright.xml">
URI: http://xml.org/sax/features/external-general-entities
Access: read/write
Default: unspecified; always true if the parser is validating (see the “Validation” section)

External Parameter Entity Processing

This feature tells a parser whether or not to process external parameter entities, used to define DTDs by a system and/or public ID (rather than directly ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required