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
public abstract class XMLParser2 extends java.lang.Object implements XMLParser
The abstract superclass of XML parsers that produce DOM Documents. The features have the same defaults asDocumentBuilderFactory.- Version:
- $Revision: 652845 $ $Date: 2008-05-02 12:46:46 -0500 (Fri, 02 May 2008) $
-
-
Field Summary
Fields Modifier and Type Field Description private booleancoalescingprivate booleanexpandEntityRefprivate booleanignoreCommentsprivate booleannamespaceAwareprivate booleanvalidatingprivate booleanwhitespace
-
Constructor Summary
Constructors Constructor Description XMLParser2()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanisCoalescing()Learn whether the underlying parser is coalescing.booleanisExpandEntityReferences()Learn whether the underlying parser expands entity references.booleanisIgnoringComments()Learn whether the underlying parser ignores comments.booleanisIgnoringElementContentWhitespace()Learn whether the underlying parser is ignoring whitespace.booleanisNamespaceAware()Learn whether the underlying parser is ns-aware.booleanisValidating()Learn whether the underlying parser is validating.abstract java.lang.ObjectparseXML(java.io.InputStream stream)Reads the supplied XML file and returns the resulting model, which is not necessarily DOM.voidsetCoalescing(boolean coalescing)Set whether the underlying parser is coalescing.voidsetExpandEntityReferences(boolean expandEntityRef)Set whether the underlying parser expands entity references.voidsetIgnoringComments(boolean ignoreComments)Set whether the underlying parser ignores comments.voidsetIgnoringElementContentWhitespace(boolean whitespace)Set whether the underlying parser is ignoring whitespace.voidsetNamespaceAware(boolean namespaceAware)Set whether the underlying parser is ns-aware.voidsetValidating(boolean validating)Set whether the underlying parser should be validating.
-
-
-
Method Detail
-
setValidating
public void setValidating(boolean validating)
Set whether the underlying parser should be validating.- Parameters:
validating- flag- See Also:
DocumentBuilderFactory.setValidating(boolean)
-
isValidating
public boolean isValidating()
Learn whether the underlying parser is validating.- Returns:
- boolean
- See Also:
DocumentBuilderFactory.isValidating()
-
isNamespaceAware
public boolean isNamespaceAware()
Learn whether the underlying parser is ns-aware.- Returns:
- boolean
- See Also:
DocumentBuilderFactory.isNamespaceAware()
-
setNamespaceAware
public void setNamespaceAware(boolean namespaceAware)
Set whether the underlying parser is ns-aware.- Parameters:
namespaceAware- flag- See Also:
DocumentBuilderFactory.setNamespaceAware(boolean)
-
setIgnoringElementContentWhitespace
public void setIgnoringElementContentWhitespace(boolean whitespace)
Set whether the underlying parser is ignoring whitespace.- Parameters:
whitespace- flag- See Also:
DocumentBuilderFactory.setIgnoringElementContentWhitespace(boolean)
-
isIgnoringElementContentWhitespace
public boolean isIgnoringElementContentWhitespace()
Learn whether the underlying parser is ignoring whitespace.- Returns:
- boolean
- See Also:
DocumentBuilderFactory.isIgnoringElementContentWhitespace()
-
isExpandEntityReferences
public boolean isExpandEntityReferences()
Learn whether the underlying parser expands entity references.- Returns:
- boolean
- See Also:
DocumentBuilderFactory.isExpandEntityReferences()
-
setExpandEntityReferences
public void setExpandEntityReferences(boolean expandEntityRef)
Set whether the underlying parser expands entity references.- Parameters:
expandEntityRef- flag- See Also:
DocumentBuilderFactory.setExpandEntityReferences(boolean)
-
isIgnoringComments
public boolean isIgnoringComments()
Learn whether the underlying parser ignores comments.- Returns:
- boolean
- See Also:
DocumentBuilderFactory.isIgnoringComments()
-
setIgnoringComments
public void setIgnoringComments(boolean ignoreComments)
Set whether the underlying parser ignores comments.- Parameters:
ignoreComments- flag- See Also:
DocumentBuilderFactory.setIgnoringComments(boolean)
-
isCoalescing
public boolean isCoalescing()
Learn whether the underlying parser is coalescing.- Returns:
- boolean
- See Also:
DocumentBuilderFactory.isCoalescing()
-
setCoalescing
public void setCoalescing(boolean coalescing)
Set whether the underlying parser is coalescing.- Parameters:
coalescing- flag- See Also:
DocumentBuilderFactory.setCoalescing(boolean)
-
parseXML
public abstract java.lang.Object parseXML(java.io.InputStream stream)
Description copied from interface:XMLParserReads the supplied XML file and returns the resulting model, which is not necessarily DOM.
-
-