All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class oracle.xml.parser.v2.XMLParser

java.lang.Object
   |
   +----oracle.xml.parser.v2.XMLParser

public abstract class XMLParser
extends Object
implements XMLConstants
This class serves as a base class for the DOMParser and SAXParser classes. It contains methods to parse eXtensible Markup Language (XML) 1.0 documents according to the World Wide Web Consortium (W3C) recommendation. This class can not be instantiated (applications may use the DOM or SAX parser depending on their requirements).


Method Index

 o getReleaseVersion()
Returns the release version of the Oracle XML Parser
 o getValidationMode()
Returns the validation mode
 o parse(InputSource)
Parses the XML from given input source
 o parse(InputStream)
Parses the XML from given input stream.
 o parse(Reader)
Parses the XML from given input stream.
 o parse(String)
Parses the XML from the URL indicated
 o parse(URL)
Parses the XML document pointed to by the given URL and creates the corresponding XML document hierarchy.
 o setBaseURL(URL)
Set the base URL for loading external enitites and DTDs.
 o setDoctype(DTD)
Set the DTD
 o setLocale(Locale)
Applications can use this to set the locale for error reporting.
 o setPreserveWhitespace(boolean)
Set the white space preserving mode
 o setSchemaValidationMode(boolean)
Set the schema validation mode
 o setValidationMode(boolean)
Set the validation mode

Methods

 o parse
 public final void parse(InputSource in) throws XMLParseException, SAXException, IOException
Parses the XML from given input source

Parameters:
in - the org.xml.sax.InputSouce to parse
Throws: XMLParseException
if syntax or other error encountered.
Throws: SAXException
Any SAX exception, possibly wrapping another exception.
Throws: IOException
IO Error.
 o parse
 public final void parse(String in) throws XMLParseException, SAXException, IOException
Parses the XML from the URL indicated

Parameters:
in - the String containing the URL to parse from
Throws: XMLParseException
if syntax or other error encountered.
Throws: SAXException
Any SAX exception, possibly wrapping another exception.
Throws: IOException
IO Error.
 o parse
 public final void parse(URL url) throws XMLParseException, SAXException, IOException
Parses the XML document pointed to by the given URL and creates the corresponding XML document hierarchy.

Parameters:
url - the url points to the XML document to parse.
Throws: XMLParseException
if syntax or other error encountered.
Throws: SAXException
Any SAX exception, possibly wrapping another exception.
Throws: IOException
IO Error.
 o parse
 public final void parse(InputStream in) throws XMLParseException, SAXException, IOException
Parses the XML from given input stream. The base URL should be set for resolving external entities and DTD.

Parameters:
in - the InputStream containing XML data to parse.
Throws: XMLParseException
if syntax or other error encountered.
Throws: SAXException
Any SAX exception, possibly wrapping another exception.
Throws: IOException
IO Error.
See Also:
setBaseURL
 o parse
 public final void parse(Reader r) throws XMLParseException, SAXException, IOException
Parses the XML from given input stream. The base URL should be set for resolving external entities and DTD.

Parameters:
r - the Reader containing XML data to parse.
Throws: XMLParseException
if syntax or other error encountered.
Throws: SAXException
Any SAX exception, possibly wrapping another exception.
Throws: IOException
IO Error.
See Also:
setBaseURL
 o setLocale
 public void setLocale(Locale locale) throws SAXException
Applications can use this to set the locale for error reporting.

Parameters:
locale - Locale to set
Throws: SAXException
A SAXException could be thrown.
See Also:
setLocale
 o setDoctype
 public void setDoctype(DTD dtd)
Set the DTD

Parameters:
dtd - DTD to set and used while parsing
 o setSchemaValidationMode
 public void setSchemaValidationMode(boolean flag)
Set the schema validation mode

Parameters:
flag - determines whether the XML parser should invoke schema validating
 o setValidationMode
 public void setValidationMode(boolean yes)
Set the validation mode

Parameters:
yes - determines whether the XML parser should be validating
 o setBaseURL
 public void setBaseURL(URL url)
Set the base URL for loading external enitites and DTDs. This method should to be called if the parse(InputStream) is used to parse the XML Document

Parameters:
url - The base URL
 o setPreserveWhitespace
 public void setPreserveWhitespace(boolean flag)
Set the white space preserving mode

Parameters:
flag - preserving mode
 o getValidationMode
 public boolean getValidationMode()
Returns the validation mode

Returns:
true if the XML parser is validating false if not
 o getReleaseVersion
 public static String getReleaseVersion()
Returns the release version of the Oracle XML Parser

Returns:
the release version string

All Packages  Class Hierarchy  This Package  Previous  Next  Index