Package org.apache.commons.jxpath.xml
Class XMLParser2
java.lang.Object
org.apache.commons.jxpath.xml.XMLParser2
- All Implemented Interfaces:
XMLParser
- Direct Known Subclasses:
DocumentContainer,DOMParser,JDOMParser
The abstract superclass of XML parsers that produce DOM Documents. The features have the same defaults as
DocumentBuilderFactory.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate booleanprivate booleanprivate booleanprivate booleanprivate boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanTests whether the underlying parser is coalescing.booleanTests whether the underlying parser expands entity references.booleanTests whether the underlying parser ignores comments.booleanTests whether the underlying parser is ignoring whitespace.booleanTests whether the underlying parser is ns-aware.booleanTests whether the underlying parser is validating.abstract ObjectparseXML(InputStream stream) Reads the supplied XML file and returns the resulting model, which is not necessarily DOM.voidsetCoalescing(boolean coalescing) Sets whether the underlying parser is coalescing.voidsetExpandEntityReferences(boolean expandEntityRef) Sets whether the underlying parser expands entity references.voidsetIgnoringComments(boolean ignoreComments) Sets whether the underlying parser ignores comments.voidsetIgnoringElementContentWhitespace(boolean whitespace) Sets whether the underlying parser is ignoring whitespace.voidsetNamespaceAware(boolean namespaceAware) Sets whether the underlying parser is ns-aware.voidsetValidating(boolean validating) Sets whether the underlying parser should be validating.
-
Field Details
-
validating
private boolean validating -
namespaceAware
private boolean namespaceAware -
whitespace
private boolean whitespace -
expandEntityRef
private boolean expandEntityRef -
ignoreComments
private boolean ignoreComments -
coalescing
private boolean coalescing
-
-
Constructor Details
-
XMLParser2
public XMLParser2()Constructs a new instance for subclasses.
-
-
Method Details
-
isCoalescing
public boolean isCoalescing()Tests whether the underlying parser is coalescing.- Returns:
- boolean
- See Also:
-
isExpandEntityReferences
public boolean isExpandEntityReferences()Tests whether the underlying parser expands entity references.- Returns:
- boolean
- See Also:
-
isIgnoringComments
public boolean isIgnoringComments()Tests whether the underlying parser ignores comments.- Returns:
- boolean
- See Also:
-
isIgnoringElementContentWhitespace
public boolean isIgnoringElementContentWhitespace()Tests whether the underlying parser is ignoring whitespace.- Returns:
- boolean
- See Also:
-
isNamespaceAware
public boolean isNamespaceAware()Tests whether the underlying parser is ns-aware.- Returns:
- boolean
- See Also:
-
isValidating
public boolean isValidating()Tests whether the underlying parser is validating.- Returns:
- boolean
- See Also:
-
parseXML
Description copied from interface:XMLParserReads the supplied XML file and returns the resulting model, which is not necessarily DOM. -
setCoalescing
public void setCoalescing(boolean coalescing) Sets whether the underlying parser is coalescing.- Parameters:
coalescing- flag- See Also:
-
setExpandEntityReferences
public void setExpandEntityReferences(boolean expandEntityRef) Sets whether the underlying parser expands entity references.- Parameters:
expandEntityRef- flag- See Also:
-
setIgnoringComments
public void setIgnoringComments(boolean ignoreComments) Sets whether the underlying parser ignores comments.- Parameters:
ignoreComments- flag- See Also:
-
setIgnoringElementContentWhitespace
public void setIgnoringElementContentWhitespace(boolean whitespace) Sets whether the underlying parser is ignoring whitespace.- Parameters:
whitespace- flag- See Also:
-
setNamespaceAware
public void setNamespaceAware(boolean namespaceAware) Sets whether the underlying parser is ns-aware.- Parameters:
namespaceAware- flag- See Also:
-
setValidating
public void setValidating(boolean validating) Sets whether the underlying parser should be validating.- Parameters:
validating- flag- See Also:
-