|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.xml.parsers.DocumentBuilder
Parser to create a DOM Document from an input source
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder parser = factory.newDocumentBuilder();
Document doc = parser.parse(myInputSource);
Constructor Summary | |
DocumentBuilder()
|
Method Summary | |
abstract DOMImplementation |
getDOMImplementation()
Returns an instance of a DOM implementation |
abstract boolean |
isNamespaceAware()
Returns true if the parser is namespace-aware |
abstract boolean |
isValidating()
Returns true if the parser is validating |
abstract Document |
newDocument()
Returns a new Document |
Document |
parse(java.io.File file)
Parse given a File |
abstract Document |
parse(org.xml.sax.InputSource source)
Parse given an input source |
Document |
parse(java.io.InputStream stream)
Parse the given input stream |
Document |
parse(java.io.InputStream stream,
java.lang.String systemId)
Parse the given input stream |
Document |
parse(java.lang.String uri)
Parse given a path name |
abstract void |
setEntityResolver(org.xml.sax.EntityResolver er)
Sets the entity resolver |
abstract void |
setErrorHandler(org.xml.sax.ErrorHandler eh)
Sets the error handler |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DocumentBuilder()
Method Detail |
public abstract DOMImplementation getDOMImplementation()
public abstract boolean isNamespaceAware()
public abstract boolean isValidating()
public abstract Document newDocument()
public Document parse(java.io.File file) throws org.xml.sax.SAXException, java.io.IOException
file
- a path to the file to openpublic abstract Document parse(org.xml.sax.InputSource source) throws org.xml.sax.SAXException, java.io.IOException
source
- a SAX input sourcepublic Document parse(java.io.InputStream stream) throws org.xml.sax.SAXException, java.io.IOException
stream
- the input stream to be used as a sourcepublic Document parse(java.io.InputStream stream, java.lang.String systemId) throws org.xml.sax.SAXException, java.io.IOException
stream
- the input stream to be used as a sourcesystemId
- base for resolving relative URLspublic Document parse(java.lang.String uri) throws org.xml.sax.SAXException, java.io.IOException
uri
- a path to the file to openpublic abstract void setEntityResolver(org.xml.sax.EntityResolver er)
public abstract void setErrorHandler(org.xml.sax.ErrorHandler eh)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |