|
Oracle® Application Server XML Java API Reference 10g Release 3 (10.1.3) B28238-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
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 | |
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, EXPAND_ENTITYREF, PARSER, PARSER_CDATA, PARSER_DTD, SCHEMA_LANGUAGE, SCHEMA_OBJECT, SCHEMA_SOURCE, STANDALONE, USE_DTD_ONLY_FOR_VALIDATION |
Constructor Summary | |
DOMParser() Creates a new parser object. |
Method Summary | |
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, getEntityResolver, getErrorHandler, getReleaseVersion, getValidationMode, getValidationModeValue, getXMLProperty, isXMLPropertyReadOnly, isXMLPropertySupported, parse, parse, parse, parse, parse, setBaseURL, setDoctype, setEntityResolver, setErrorHandler, setLocale, setPreserveWhitespace, setSchemaValidationMode, setSchemaValidatorProperty, setValidationMode, setValidationMode, setXMLProperty, setXMLSchema |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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()
reset
in class XMLParser
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 warningsjava.io.IOException
- if I/O error occurs in setting the error stream.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 void setNodeFactory(NodeFactory factory) throws XMLParseException
factory
- The NodeFactory
to setXMLParseException
- if an invalid factory is setNodeFactory
public DTD getDoctype()
DTD
public void showWarnings(boolean flag)
flag
- determines whether warnings should be shownpublic void retainCDATASection(boolean flag)
flag
- FALSE - convert CDATASection to Text nodes (default)public void setDebugMode(boolean flag)
flag
- determines whether debug info is storedpublic 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)
public void setAttribute(java.lang.String name, java.lang.Object value) throws java.lang.IllegalArgumentException
setAttribute
in class XMLParser
name
- The name of the attribute.value
- The value of the attribute.java.lang.IllegalArgumentException
- thrown if the underlying implementation doesn't recognize the attribute.public java.lang.Object getAttribute(java.lang.String name) throws java.lang.IllegalArgumentException
getAttribute
in class XMLParser
name
- The name of the attribute.java.lang.IllegalArgumentException
- thrown if the underlying implementation doesn't recognize the attribute.
|
Oracle® Application Server XML Java API Reference 10g Release 3 (10.1.3) B28238-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |