Appendix B. SAX 2.0 Features and Properties
This appendix details 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 and write; features also may be
modifiable only when parsing is occurring, or only when parsing is
not occurring.
Namespace Processing
This feature instructs a parser to perform
namespace processing, which will cause 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
, this processing will occur. When
false
, namespace processing will not occur (this
implies that the namespace prefix reporting feature is on).
URI: http://xml.org/sax/features/namespaces |
Access: Read-only when parsing; read/write when not parsing |
Namespace Prefix Reporting
This feature instructs a parser to report
the attributes used in namespace declarations, such as the
xmlns:[namespace
prefix]
attributes. When this feature ...
Get Java and XML 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.