SAXBuilder(boolean nsaware, boolean validate) Constructor that creates the parser on-the-fly.
public
SAXBuilder(boolean nsaware, boolean validate, boolean smartIgnore) Constructor that creates the parser on-the-fly, that accepts
an additional option, smartIgnore.
When parsing XML for input purpose only, it is better to use this
constructor with smartIgnore true, and then comments will be ignored
CDATA will be coalesced with TEXT.
isCoalescing() Indicates whether or not the factory is configured to produce parsers
which converts CDATA to Text and appends it to the adjacent (if any)
Text node.
setCoalescing(boolean coalescing) Specifies that the parser produced by this code will convert
CDATA to Text and append it to the adjacent (if any) text.
Constructor that creates the parser on-the-fly.
Parameters: nsaware - whether the parser is namespace aware Parameters: validate - whether the parser shall validate the document exception: ParserConfigurationException - if a parser cannot be createdwhich satisfies the requested configuration. See Also:SAXBuilder.SAXBuilder(boolean,boolean,boolean)
Constructor that creates the parser on-the-fly, that accepts
an additional option, smartIgnore.
When parsing XML for input purpose only, it is better to use this
constructor with smartIgnore true, and then comments will be ignored
CDATA will be coalesced with TEXT. A smaller DOM tree is formed.
Parameters: nsaware - whether the parser is namespace aware Parameters: validate - whether the parser shall validate the document Parameters: smartIgnore - whether to ignore comments and ignorable-whitesace(if validate is true), and to coalesce exception: ParserConfigurationException - if a parser cannot be createdwhich satisfies the requested configuration.
Indicates whether or not the factory is configured to produce parsers
which converts CDATA to Text and appends it to the adjacent (if any)
Text node.
Default: false.
true if the factory is configured to produce parsers whichconverts CDATA nodes to Text nodesand appends it to the adjacent (if any) Text node; false otherwise.
isExpandEntityReferences
final public boolean isExpandEntityReferences()(Code)
Specifies the org.xml.sax.ErrorHandler to be used to report errors
present in the XML document to be parsed.
Default: null -- to use the default imple-mentation and behavior.
setExpandEntityReferences
final public void setExpandEntityReferences(boolean expand)(Code)
Sets whether to expand entities during parsing.
A true means to expand entities as normal content. A false means to
leave entities unexpanded as EntityReference objects.
Default: true.
Parameters: expand - whether entity expansion should occur.
Sets the iDOM factory. Null for DefaultIDOMFactory.THE.
setIgnoringComments
final public void setIgnoringComments(boolean ignoreComments)(Code)
Specifies that the parser produced by this code will ignore comments.
Default: false.
setIgnoringElementContentWhitespace
final public void setIgnoringElementContentWhitespace(boolean ignore)(Code)
Sets whether the parser should elminate whitespace in
element content. They are known as "ignorable whitespace".
Only whitespace which is contained within element content that has
an element only content model will be eliminated (see XML Rec 2.10).
For this setting to take effect requires that validation be turned on.
Default: false.
Parameters: ignore - Whether to ignore whitespaces in element content.