public static final class XmlReadingFeatures.Xerces.DOM extends Object
Modifier and Type | Field and Description |
---|---|
static String |
CREATE_ENTITY_REFERENCE_NODES
true (default): Create EntityReference nodes in
the DOM tree. |
static String |
DEFER_NODE_EXPANSION
true (default): Lazily expand the DOM nodes. |
static String |
INCLUDE_IGNORABLE_WHITESPACE
true (default): Include text nodes that can be considered "ignorable
whitespace" in the DOM tree. |
public static final String DEFER_NODE_EXPANSION
true
(default): Lazily expand the DOM nodes.
false
: Fully expand the DOM nodes.
Note: In the LSParser
implementation the default value
of this feature is false
.
When this feature is set to true
, the DOM nodes in the returned
document are expanded as the tree is traversed. This allows the parser to
return a document faster than if the tree is fully expanded during parsing
and improves memory usage when the whole tree is not traversed.
public static final String CREATE_ENTITY_REFERENCE_NODES
true
(default): Create EntityReference
nodes in
the DOM tree. The EntityReference
nodes and their child
nodes will be read-only.
false
: Do not create EntityReference
nodes in the
DOM tree. No EntityReference
nodes will be created, only
the nodes corresponding to their fully expanded substitution text will be
created.
Note: This feature only affects the appearance of
EntityReference
nodes in the DOM tree. The document will
always contain the entity reference child nodes.
public static final String INCLUDE_IGNORABLE_WHITESPACE
true
(default): Include text nodes that can be considered "ignorable
whitespace" in the DOM tree.
false
: Do not include ignorable whitespace in the DOM tree.
Note: The only way that the parser can determine if text is ignorable is by
reading the associated grammar and having a content model for the document.
When ignorable whitespace text nodes are included in the DOM tree, they will
be flagged as ignorable. The ignorable flag can be queried by calling the
Text.isElementContentWhitespace()
method. This feature is
relevant only when the grammar is DTD.
Copyright © 2025. All rights reserved.