|
Oracle® XML Java API Reference Release 1 (10.1) B12024-01 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--oracle.xml.async.DOMBuilder
This class encapsulates an eXtensible Markup Language (XML) 1.0 parser to parse an XML document and build a DOM tree. The parsing is done in a separate thread and DOMBuilderListener interface must be used for notification when the tree is built.
| Field Summary | |
protected InputSource |
inSourceInputSource containing XML data to parse |
protected java.io.InputStream |
inStreamInputStream containing XML data to parse |
protected java.lang.String |
inStringString containing the URL to parse XML data from |
protected int |
methodToCallXML Parser method to call based on input types |
protected java.io.Reader |
readerjava.io.Reader containing XML data to be parsed |
protected XMLDocument |
resultXML Document being parsed |
protected java.lang.String |
rootNameName of the XML element to be treated as root |
protected java.net.URL |
urlURL to parse XML data from |
| Constructor Summary | |
DOMBuilder()Creates a new parser object. | |
DOMBuilder(int id)Creates a new parser object with a given id. | |
| Method Summary | |
void |
addDOMBuilderErrorListener(DOMBuilderErrorListener p0)Adds DOMBuilderErrorListener |
void |
addDOMBuilderListener(DOMBuilderListener p0)Adds DOMBuilderListener |
DTD |
getDoctype()Get the DTD |
XMLDocument |
getDocument()Gets the document |
int |
getId()Returns the parser object id. |
java.lang.String |
getReleaseVersion()Returns the release version of the Oracle XML Parser |
Document |
getResult()Gets the document |
boolean |
getValidationMode()Returns the validation mode |
void |
parse(InputSource in)Parses the XML from given input source |
void |
parse(java.io.InputStream in)Parses the XML from given input stream. |
void |
parse(java.io.Reader r)Parses the XML from given input stream. |
void |
parse(java.lang.String in)Parses the XML from the URL indicated |
void |
parse(java.net.URL url)Parses the XML document pointed to by the given URL and creates the corresponding XML document hierarchy. |
void |
parseDTD(InputSource in, java.lang.String rootName)Parses the XML External DTD from given input source |
void |
parseDTD(java.io.InputStream in, java.lang.String rootName)Parses the XML External DTD from given input stream. |
void |
parseDTD(java.io.Reader r, java.lang.String rootName)Parses the XML External DTD from given input stream. |
void |
parseDTD(java.lang.String in, java.lang.String rootName)Parses the XML External DTD from the URL indicated |
void |
parseDTD(java.net.URL url, java.lang.String rootName)Parses the XML External DTD document pointed to by the given URL and creates the corresponding XML document hierarchy. |
void |
removeDOMBuilderErrorListener(DOMBuilderErrorListener p0)Remove DOMBuilderErrorListener |
void |
removeDOMBuilderListener(DOMBuilderListener p0)Remove DOMBuilderListener |
void |
run()This method runs in a thread |
void |
setBaseURL(java.net.URL url)Set the base URL for loading external enitites and DTDs. |
void |
setDebugMode(boolean flag)Sets a flag to turn on debug information in the document |
void |
setDoctype(DTD dtd)Set the DTD |
void |
setErrorStream(java.io.OutputStream out)Creates an output stream for the output of errors and warnings. |
void |
setErrorStream(java.io.OutputStream out, java.lang.String enc)Creates an output stream for the output of errors and warnings. |
void |
setErrorStream(java.io.PrintWriter out)Creates an output stream for the output of errors and warnings. |
void |
setNodeFactory(NodeFactory factory)Set the node factory. |
void |
setPreserveWhitespace(boolean flag)Set the white space preserving mode |
void |
setValidationMode(boolean yes)Set the validation mode |
void |
showWarnings(boolean yes)Switch to determine whether to print warnings |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.io.Reader reader
protected java.lang.String rootName
protected java.lang.String inString
protected java.io.InputStream inStream
protected java.net.URL url
protected InputSource inSource
protected int methodToCall
protected XMLDocument result
| Constructor Detail |
public DOMBuilder()
public DOMBuilder(int id)
id - The DOMBuilder id.| Method Detail |
public int getId()
DOMBuilder idpublic void run()
run in interface java.lang.Runnablepublic void addDOMBuilderListener(DOMBuilderListener p0)
p0 - The DOMBuilderListener to addpublic void addDOMBuilderErrorListener(DOMBuilderErrorListener p0)
p0 - The DOMBuilderErrorListener to addpublic void removeDOMBuilderListener(DOMBuilderListener p0)
p0 - The DOMBuilderListener to removepublic void removeDOMBuilderErrorListener(DOMBuilderErrorListener p0)
p0 - The DOMBuilderErrorListener to removepublic Document getResult()
public DTD getDoctype()
DTDpublic void setDebugMode(boolean flag)
flag - determines whether debug info is storedpublic void showWarnings(boolean yes)
yes - determines whether warnings should be shown
public final void setErrorStream(java.io.PrintWriter out)
throws java.io.IOException
System.err for outputting errors and warnings.out - The PrintWriter to use for errors and warningsjava.io.IOException
public final void setErrorStream(java.io.OutputStream out)
throws java.io.IOException
System.err for outputting errors and warnings.out - The output stream to use for errors and warningsjava.io.IOException
public final void setErrorStream(java.io.OutputStream out,
java.lang.String enc)
throws java.io.IOException
System.err for outputting errors and warnings. Additionally, an .exception is thrown if the encoding specified is unsupported.out - The output stream to use for errors and warningsenc - the encoding to usejava.io.IOException - if an unsupported encoding is specifiedpublic XMLDocument getDocument()
public void setNodeFactory(NodeFactory factory)
throws XMLParseException
factory - The NodeFactory to setXMLParseException - if an invalid factory is setNodeFactorypublic void setDoctype(DTD dtd)
dtd - DTD to set and used while parsingpublic void setValidationMode(boolean yes)
yes - determines whether the XML parser should be validatingpublic void setBaseURL(java.net.URL url)
url - The base URLpublic void setPreserveWhitespace(boolean flag)
flag - preserving modepublic boolean getValidationMode()
true if the XML parser is validating false if notpublic java.lang.String getReleaseVersion()
public final void parse(InputSource in)
throws XMLParseException,
SAXException,
java.io.IOException
in - the org.xml.sax.InputSouce to parseXMLParseException - if syntax or other error encountered.SAXException - Any SAX exception, possibly wrapping another exception.java.io.IOException - IO Error.
public final void parse(java.lang.String in)
throws XMLParseException,
SAXException,
java.io.IOException
in - the String containing the URL to parse fromXMLParseException - if syntax or other error encountered.SAXException - Any SAX exception, possibly wrapping another exception.java.io.IOException - IO Error.
public final void parse(java.net.URL url)
throws XMLParseException,
SAXException,
java.io.IOException
url - the url points to the XML document to parse.XMLParseException - if syntax or other error encountered.SAXException - Any SAX exception, possibly wrapping another exception.java.io.IOException - IO Error.
public final void parse(java.io.InputStream in)
throws XMLParseException,
SAXException,
java.io.IOException
in - the InputStream containing XML data to parse.XMLParseException - if syntax or other error encountered.SAXException - Any SAX exception, possibly wrapping another exception.java.io.IOException - IO Error.XMLParser.setBaseURL(java.net.URL)
public final void parse(java.io.Reader r)
throws XMLParseException,
SAXException,
java.io.IOException
r - the Reader containing XML data to parse.XMLParseException - if syntax or other error encountered.SAXException - Any SAX exception, possibly wrapping another exception.java.io.IOException - IO Error.XMLParser.setBaseURL(java.net.URL)
public final void parseDTD(InputSource in,
java.lang.String rootName)
throws XMLParseException,
SAXException,
java.io.IOException
in - the org.xml.sax.InputSouce to parserootName - the element to be used as root ElementXMLParseException - if syntax or other error encountered.SAXException - Any SAX exception, possibly wrapping another exception.java.io.IOException - IO Error.
public final void parseDTD(java.lang.String in,
java.lang.String rootName)
throws XMLParseException,
SAXException,
java.io.IOException
in - the String containing the URL to parse fromrootName - the element to be used as root ElementXMLParseException - if syntax or other error encountered.SAXException - Any SAX exception, possibly wrapping another exception.java.io.IOException - IO Error.
public final void parseDTD(java.net.URL url,
java.lang.String rootName)
throws XMLParseException,
SAXException,
java.io.IOException
url - the url points to the XML document to parse.rootName - the element to be used as root ElementXMLParseException - if syntax or other error encountered.SAXException - Any SAX exception, possibly wrapping another exception.java.io.IOException - IO Error.
public final void parseDTD(java.io.InputStream in,
java.lang.String rootName)
throws XMLParseException,
SAXException,
java.io.IOException
in - the InputStream containing XML data to parse.rootName - the element to be used as root ElementXMLParseException - if syntax or other error encountered.SAXException - Any SAX exception, possibly wrapping another exception.java.io.IOException - IO Error.XMLParser.setBaseURL(java.net.URL)
public final void parseDTD(java.io.Reader r,
java.lang.String rootName)
throws XMLParseException,
SAXException,
java.io.IOException
r - the Reader containing XML data to parse.rootName - the element to be used as root ElementXMLParseException - if syntax or other error encountered.SAXException - Any SAX exception, possibly wrapping another exception.java.io.IOException - IO Error.XMLParser.setBaseURL(java.net.URL)
|
Oracle® XML Java API Reference Release 1 (10.1) B12024-01 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||