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
.- Version:
- $Revision: 652845 $ $Date: 2008-05-02 12:46:46 -0500 (Fri, 02 May 2008) $
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
private boolean
private boolean
private boolean
private boolean
private boolean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Learn whether the underlying parser is coalescing.boolean
Learn whether the underlying parser expands entity references.boolean
Learn whether the underlying parser ignores comments.boolean
Learn whether the underlying parser is ignoring whitespace.boolean
Learn whether the underlying parser is ns-aware.boolean
Learn whether the underlying parser is validating.abstract Object
parseXML
(InputStream stream) Reads the supplied XML file and returns the resulting model, which is not necessarily DOM.void
setCoalescing
(boolean coalescing) Set whether the underlying parser is coalescing.void
setExpandEntityReferences
(boolean expandEntityRef) Set whether the underlying parser expands entity references.void
setIgnoringComments
(boolean ignoreComments) Set whether the underlying parser ignores comments.void
setIgnoringElementContentWhitespace
(boolean whitespace) Set whether the underlying parser is ignoring whitespace.void
setNamespaceAware
(boolean namespaceAware) Set whether the underlying parser is ns-aware.void
setValidating
(boolean validating) Set 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()
-
-
Method Details
-
setValidating
public void setValidating(boolean validating) Set whether the underlying parser should be validating.- Parameters:
validating
- flag- See Also:
-
isValidating
public boolean isValidating()Learn whether the underlying parser is validating.- Returns:
- boolean
- See Also:
-
isNamespaceAware
public boolean isNamespaceAware()Learn whether the underlying parser is ns-aware.- Returns:
- boolean
- See Also:
-
setNamespaceAware
public void setNamespaceAware(boolean namespaceAware) Set whether the underlying parser is ns-aware.- Parameters:
namespaceAware
- flag- See Also:
-
setIgnoringElementContentWhitespace
public void setIgnoringElementContentWhitespace(boolean whitespace) Set whether the underlying parser is ignoring whitespace.- Parameters:
whitespace
- flag- See Also:
-
isIgnoringElementContentWhitespace
public boolean isIgnoringElementContentWhitespace()Learn whether the underlying parser is ignoring whitespace.- Returns:
- boolean
- See Also:
-
isExpandEntityReferences
public boolean isExpandEntityReferences()Learn whether the underlying parser expands entity references.- Returns:
- boolean
- See Also:
-
setExpandEntityReferences
public void setExpandEntityReferences(boolean expandEntityRef) Set whether the underlying parser expands entity references.- Parameters:
expandEntityRef
- flag- See Also:
-
isIgnoringComments
public boolean isIgnoringComments()Learn whether the underlying parser ignores comments.- Returns:
- boolean
- See Also:
-
setIgnoringComments
public void setIgnoringComments(boolean ignoreComments) Set whether the underlying parser ignores comments.- Parameters:
ignoreComments
- flag- See Also:
-
isCoalescing
public boolean isCoalescing()Learn whether the underlying parser is coalescing.- Returns:
- boolean
- See Also:
-
setCoalescing
public void setCoalescing(boolean coalescing) Set whether the underlying parser is coalescing.- Parameters:
coalescing
- flag- See Also:
-
parseXML
Description copied from interface:XMLParser
Reads the supplied XML file and returns the resulting model, which is not necessarily DOM.
-