Appendix B. SAX 2.0 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.

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 2 and Chapter 3.

Namespace Processing

This feature instructs a parser to perform namespace processing, which causes namespace prefixes, namespace URIs, and element local names to be available through the SAX namespace callbacks (startPrefixMapping() and endPrefixMapping(), as well as certain parameters supplied to startElement() and endElement()). When this feature is true, the processing will occur. When false, namespace processing will not occur (this implies that the namespace prefix reporting feature is on). The default in most parsers is true.

Access: Read-only when parsing, read/write when not parsing

Namespace Prefix Reporting

This feature instructs a parser to report the ...

Get Java and XML, Second Edition now with O’Reilly online learning.

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