Oracle9i Supplied Java Packages Reference Release 2 (9.2) Part Number A96609-01 |
|
This chapter documents package oracle.xml.util. This package contains the utility classes that provide error handling and support extensions to XSLT Processor for Java in the XDK for Java.
The full functionality of the XML Parser, DOM, and SAX APIs are contained in the oracle.xml.parser.v2 package, which is documented in Chapter 11, "Package oracle.xml.parser.v2" in this manual.
This chapter contains these sections:
The classes contained in oracle.xml.util provide error handling and extensions to the XSLT Processor for Java, which is provided in the Oracle XDK for Java. The classes in this package support the W3C XML standard.
For descriptions of the classes that implement the Java DOM Parser and the XSLT Processor, refer to Chapter 11, "Package oracle.xml.parser.v2" in this manual.
See Also:
For information about developing applications using the XDK, refer to Oracle9i XML Developer's Kits Guide - XDK. |
Interface in package oracle.xml.util. This interface provides Namespace support for Element and Attr names.
public interface NSName
Get the fully resolved name for this name
public java.lang.String getExpandedName()
The fully resolved name
Get the local name for this name
public java.lang.String getLocalName()
The local name
Get the resolved Namespace for this name
public java.lang.String getNamespace()
The resolved Namespace
Get the prefix for this name
public java.lang.String getPrefix()
The prefix
Get the qualified name
public java.lang.String getQualifiedName()
The qualified name
This class holds the error message and the line number where it occured
public class XMLError oracle.xml.util.XMLError
Default constructor
public XMLError()
Adds a new error to the vector
public void error(int id, int type, java.lang.String msg)
id
- - id of the error message
mesg
- - error message (without paramters)
type
- - type of the error
Adds a new error to the vector
public void error(int id, int type, java.lang.String[] p)
id
- - id of the error message
type
- - type of the error
p
- - paramter array
Adds a new error to the vector
public void error0(int id, int type)
id
- - id of the error message
type
- - type of the error
Adds a new error to the vector
public void error1(int id, int type, java.lang.String p1)
id
- - id of the error message
type
- - type of the error
p1
- - paramter 1
Adds a new error to the vector
public void error2(int id, int type, java.lang.String p1, java.lang.String p2)
id
- - id of the error message
type
- - type of the error
p1
- - paramter 1
p2
- - paramter 2
Adds a new error to the vector
public void error3(int id, int type, java.lang.String p1, java.lang.String p2, java.lang.String p3)
id
- - id of the error message
type
- - type of the error
p1
- - paramter 1
p2
- - paramter 2
p3
- - paramter 3
Flush all the error to the ouput stream output stream defaults or to error handler
public void flushErrorStream()
public java.lang.String formatErrorMesg(int index)
Get the column number of error at specified index
public int getColumnNumber(int i)
The column number
Get the exception (if exists) that occured in error at specified index
public java.lang.Exception getException(int i)
The exception
public int getFirstError()
Get the line number of error at specified index
public int getLineNumber(int i)
The line number
Return the registered locator
public org.xml.sax.Locator getLocator()
locator
Get the error message at specified index
public java.lang.String getMessage(int i)
The error message
Get error message with more than 5 arguments
public java.lang.String getMessage(int errId, java.lang.String[] params)
Get error message with no arguments
public java.lang.String getMessage0(int errId)
Get error message with 1 arguments
public java.lang.String getMessage1(int errId, java.lang.String a1)
Get error message with 2 arguments
public java.lang.String getMessage2(int errId, java.lang.String a1, java.lang.String a2)
Get error message with 3 arguments
public java.lang.String getMessage3(int errId, java.lang.String a1, java.lang.String a2, java.lang.String a3)
Get error message with 4 arguments
public java.lang.String getMessage4(int errId, java.lang.String a1, java.lang.String a2, java.lang.String a3, java.lang.String a4)
Get error message with 5 arguments
public java.lang.String getMessage5(int errId, java.lang.String a1, java.lang.String a2, java.lang.String a3, java.lang.String a4, java.lang.String a5)
Get the type of the error message at specified index
public int getMessageType(int i)
The error message type
Return the total number of errors/warnings found during parsing
public int getNumMessages()
The number of errors/warnings
Get the public ID of input when error at specified index occured
public java.lang.String getPublicId(int i)
The public ID
Get the system ID of input when error at specified index occured
public java.lang.String getSystemId(int i)
The system ID
Flush all the JAXP 1.1 errors to the ErrorListener If no ErrorListener was set, default to System.err
public void printErrorListener()
Reset the error class
public void reset()
Register an output stream
public void setErrorStream(java.io.OutputStream out)
out
- - OutputStream to ouput the error/warnings
Register an output stream
public void setErrorStream(java.io.OutputStream out, java.lang.String enc)
out
- - OutputStream to ouput the error/warnings
enc
- - Encoding of the outputstream
IOException
- - if an error occurs initializing the outputstream
Register an output stream
public void setErrorStream(java.io.PrintWriter out)
out
- - PrintWriter to ouput the error/warnings
Register an exception
public void setException(java.lang.Exception exp)
exp
- - last exception occured
Register a locale
public void setLocale(java.util.Locale locale)
locale
- - locale for error reporting
Register a locator
public void setLocator(org.xml.sax.Locator locator)
locator
- - locater to get lin/col/sysid/pubid info
Turn reporting warning on/off
public void showWarnings(boolean flag)
flag
- - controls reporting of warnings
In package oracle.xml.util. Indicates that a parsing exception occurred while processing an XML document
public class XMLException extends java.lang.Exception java.lang.Object | +--java.lang.Throwable | +--java.lang.Exception | +--oracle.xml.util.XMLException
java.io.Serializable
public XMLException(java.lang.String mesg, java.lang.String pubId, java.lang.String sysId, int line, int col, int type)
public XMLException(XMLError
err, java.lang.Exception e)
public XMLException(XMLError
err, int firsterr)
public XMLException(XMLError
err, int firsterr, java.lang.Exception e)
Get the error message at specified index
public java.lang.String formatErrorMessage(int i)
The error message
Get the column number of error at specified index
public int getColumnNumber(int i)
The column number
Get the exception (if exists) that occured in error at specified index
public java.lang.Exception getException(int i)
The exception
Get the line number of error at specified index
public int getLineNumber(int i)
The line number
Get the error message at specified index
public java.lang.String getMessage(int i)
The error message
Get the type of the error message at specified index
public int getMessageType(int i)
The error message type
Return the total number of errors/warnings found during parsing
public int getNumMessages()
The number of errors/warnings
Get the public ID of input when error at specified index occured
public java.lang.String getPublicId(int i)
The public ID
Get the system ID of input when error at specified index occured
public java.lang.String getSystemId(int i)
The system ID
Get XMLError object inside XMLException.
public XMLError
getXMLError()
the XMLError object.
Prints this Throwable
and its backtrace to the standard error stream.
public void printStackTrace()
java.lang.Throwable.printStackTrace()
in class java.lang.Throwable
Prints this Throwable
and its backtrace to the specified print stream.
public void printStackTrace(java.io.PrintStream s)
java.lang.Throwable.printStackTrace(java.io.PrintStream)
in class java.lang.Throwable
Prints this Throwable
and its backtrace to the specified print writer.
public void printStackTrace(java.io.PrintWriter s)
java.lang.Throwable.printStackTrace(java.io.PrintWriter)
in class java.lang.Throwable
Set the underlying exception (if exists)
public void setException(java.lang.Exception ex)
ex
- exception
Override toString to pick up aReturnsny embedded exception.
public java.lang.String toString()
java.lang.Throwable.toString()
in class java.lang.Throwable
A string representation of this exception
|
Copyright © 1996, 2002 Oracle Corporation. All Rights Reserved. |
|