|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
oracle.xml.parser.v2.XMLParser | +--oracle.xml.parser.v2.DOMParser
This class implements an eXtensible Markup Language (XML) 1.0 parser according to the World Wide Web Consortium (W3C) recommendation. to parse a XML document and build a DOM tree.
| Field Summary |
| Type | Field |
|---|---|
static java.lang.String |
DEBUG_MODE
Sets Debug Mode Boolean.TRUE or Boolean.FALSE |
static java.lang.String |
ERROR_ENCODING
Encoding for errors report via error stream (only if ERROR_STREAM is set) |
static java.lang.String |
ERROR_STREAM
Error stream for reporting errors. |
static java.lang.String |
NODE_FACTORY
Set NodeFactory to build custom Nodes |
static java.lang.String |
SHOW_WARNINGS
Boolean to ignore warnings Boolean.TRUE or Boolean.FALSE |
| Fields inherited from class oracle.xml.parser.v2.XMLParser |
attributes,
BASE_URL,
DTD_OBJECT,
SCHEMA_OBJECT,
STANDALONE,
USE_DTD_ONLY_FOR_VALIDATION |
| Constructor Summary |
DOMParser()
Creates a new parser object. |
| Method Summary |
| Type | Method |
|---|---|
java.lang.Object |
getAttribute(java.lang.String name)
Allows the user to retrieve specific attributes on the underlying implementation. |
DTD |
getDoctype()
Get the DTD |
XMLDocument |
getDocument()
Gets the document |
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 |
reset()
Resets the parser state |
void |
retainCDATASection(boolean flag)
Switch to determine whether to retain CDATA sections |
void |
setAttribute(java.lang.String name,
java.lang.Object value)
Allows the user to set specific attributes on the underlying implementation. |
void |
setDebugMode(boolean flag)
Sets a flag to turn on debug information in the document |
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 |
showWarnings(boolean flag)
Switch to determine whether to print warnings |
| Methods inherited from class oracle.xml.parser.v2.XMLParser |
getBaseURL,
getCompatibilityVersion,
getEntityResolver,
getErrorHandler,
getReleaseVersion,
getValidationMode,
getValidationModeValue,
getXMLProperty,
isXMLPropertyReadOnly,
isXMLPropertySupported,
parse,
parse,
parse,
parse,
parse,
setBaseURL,
setDoctype,
setEntityResolver,
setErrorHandler,
setLocale,
setPreserveWhitespace,
setSchemaValidationMode,
setValidationMode,
setValidationMode,
setXMLProperty,
setXMLSchema |
| Field Detail |
public static final java.lang.String ERROR_STREAM
public static final java.lang.String ERROR_ENCODING
public static final java.lang.String SHOW_WARNINGS
public static final java.lang.String DEBUG_MODE
public static final java.lang.String NODE_FACTORY
| Constructor Detail |
public DOMParser()
| Method Detail |
public void reset()
public XMLDocument getDocument()
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 warnings
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 warnings
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 use
public void setNodeFactory(NodeFactory factory)
throws XMLParseException
factory - The NodeFactory to setNodeFactorypublic DTD getDoctype()
DTDpublic void showWarnings(boolean flag)
flag - determines whether warnings should be shownpublic void retainCDATASection(boolean flag)
flag - - TRUE - keep CDATASections (default)
FALSE - convert CDATASection to Text nodespublic void setDebugMode(boolean flag)
flag - determines whether debug info is stored
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 Element
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 Element
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 Element
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 ElementXMLParser.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 ElementXMLParser.setBaseURL(java.net.URL)
public void setAttribute(java.lang.String name,
java.lang.Object value)
throws java.lang.IllegalArgumentException
name - The name of the attribute.value - The value of the attribute.
public java.lang.Object getAttribute(java.lang.String name)
throws java.lang.IllegalArgumentException
name - The name of the attribute.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||