|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.xml.parsers.DocumentBuilder org.apache.xerces.jaxp.DocumentBuilderImpl
public class DocumentBuilderImpl
Field Summary |
---|
Fields inherited from interface org.apache.xerces.jaxp.JAXPConstants |
---|
JAXP_SCHEMA_LANGUAGE, JAXP_SCHEMA_SOURCE, W3C_XML_SCHEMA |
Method Summary | |
---|---|
DOMImplementation |
getDOMImplementation()
Obtain an instance of a DOMImplementation object. |
Schema |
getSchema()
Get a reference to the the Schema being used by
the XML processor. |
boolean |
isNamespaceAware()
Indicates whether or not this parser is configured to understand namespaces. |
boolean |
isValidating()
Indicates whether or not this parser is configured to validate XML documents. |
boolean |
isXIncludeAware()
Gets the XInclude processing mode for this parser |
Document |
newDocument()
Non-preferred: use the getDOMImplementation() method instead of this one to get a DOM Level 2 DOMImplementation object and then use DOM Level 2 methods to create a DOM Document object. |
Document |
parse(InputSource is)
Parse the content of the given input source as an XML document and return a new DOM Document object. |
void |
reset()
Reset this DocumentBuilder to its original configuration. |
void |
setEntityResolver(EntityResolver er)
Specify the EntityResolver to be used to resolve
entities present in the XML document to be parsed. |
void |
setErrorHandler(ErrorHandler eh)
Specify the ErrorHandler to be used by the parser. |
Methods inherited from class javax.xml.parsers.DocumentBuilder |
---|
parse, parse, parse, parse |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public Document newDocument()
newDocument
in class DocumentBuilder
public DOMImplementation getDOMImplementation()
DocumentBuilder
DOMImplementation
object.
getDOMImplementation
in class DocumentBuilder
DOMImplementation
.public Document parse(InputSource is) throws SAXException, java.io.IOException
DocumentBuilder
Document
object.
An IllegalArgumentException
is thrown if the
InputSource
is null
null.
parse
in class DocumentBuilder
is
- InputSource containing the content to be parsed.
SAXException
- If any parse errors occur.
java.io.IOException
- If any IO errors occur.DocumentHandler
public boolean isNamespaceAware()
DocumentBuilder
isNamespaceAware
in class DocumentBuilder
public boolean isValidating()
DocumentBuilder
isValidating
in class DocumentBuilder
public boolean isXIncludeAware()
isXIncludeAware
in class DocumentBuilder
DocumentBuilderFactory.setXIncludeAware(boolean)
public void setEntityResolver(EntityResolver er)
DocumentBuilder
EntityResolver
to be used to resolve
entities present in the XML document to be parsed. Setting
this to null
will result in the underlying
implementation using it's own default implementation and
behavior.
setEntityResolver
in class DocumentBuilder
er
- The EntityResolver
to be used to resolve entities
present in the XML document to be parsed.public void setErrorHandler(ErrorHandler eh)
DocumentBuilder
ErrorHandler
to be used by the parser.
Setting this to null
will result in the underlying
implementation using it's own default implementation and
behavior.
setErrorHandler
in class DocumentBuilder
eh
- The ErrorHandler
to be used by the parser.public Schema getSchema()
DocumentBuilder
Get a reference to the the Schema
being used by
the XML processor.
If no schema is being used, null
is returned.
getSchema
in class DocumentBuilder
Schema
being used or null
if none in usepublic void reset()
DocumentBuilder
Reset this DocumentBuilder
to its original configuration.
DocumentBuilder
is reset to the same state as when it was created with
DocumentBuilderFactory.newDocumentBuilder()
.
reset()
is designed to allow the reuse of existing DocumentBuilder
s
thus saving resources associated with the creation of new DocumentBuilder
s.
The reset DocumentBuilder
is not guaranteed to have the same EntityResolver
or ErrorHandler
Object
s, e.g. Object.equals(Object obj)
. It is guaranteed to have a functionally equal
EntityResolver
and ErrorHandler
.
reset
in class DocumentBuilder
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |