Skip Headers

Oracle9i Supplied Java Packages Reference
Release 2 (9.2)

Part Number A96609-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to next page

10
Package oracle.xml.util

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:


Package oracle.xml.util Description

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.


Package oracle.xml.util Summary

Table 10-1 oracle.xml.util Package Interfaces and Classes
Interface or Class Description

NSName

Public interface that provides Namespace support for Element and Attr names.

XMLError

Class that holds the error message and the line number where it occured.

XMLException

Class that indicates that a parsing exception occurred while processing an XML document.


NSName

Description

Interface in package oracle.xml.util. This interface provides Namespace support for Element and Attr names.

Syntax

public interface NSName

Methods

getExpandedName()

Description

Get the fully resolved name for this name

Syntax

public java.lang.String getExpandedName()

Returns

The fully resolved name

getLocalName()

Description

Get the local name for this name

Syntax

public java.lang.String getLocalName()

Returns

The local name

getNamespace()

Description

Get the resolved Namespace for this name

Syntax

public java.lang.String getNamespace()

Returns

The resolved Namespace

getPrefix()

Description

Get the prefix for this name

Syntax

public java.lang.String getPrefix()

Returns

The prefix

getQualifiedName()

Description

Get the qualified name

Syntax

public java.lang.String getQualifiedName()

Returns

The qualified name


XMLError

Description

This class holds the error message and the line number where it occured

Syntax

public class XMLError
 
oracle.xml.util.XMLError

Fields

Table 10-2 Fields of oracle.xml.util.XMLError
Field Syntax

col

protected int[] col

errid

protected int[] errid

exp

protected java.lang.Exception[] exp

line

protected int[] line

mesg

protected java.lang.String[] mesg

pubId

protected java.lang.String[] pubId

sysId

protected java.lang.String[] sysId

types

protected int[] types


Constructors

XMLError()

Description

Default constructor

Syntax

public  XMLError()

Methods

Table 10-3  Summary of Methods of oracle.xml.util.XMLError
Method Description

error( int, int, String)

Adds a new error to the vector

error( int, int, String[])

Adds a new error to the vector

error0( int, int)

Adds a new error to the vector

error1( int, int, String)

Adds a new error to the vector

error2( int, int, String, String)

Adds a new error to the vector

error3( int, int, String, String, String)

Adds a new error to the vector

flushErrorStream()

Flush all the error to the ouput stream output stream defaults or to error handler

formatErrorMesg( int)

getColumnNumber()

Get the column number of error at specified index

getException( int)

Get the exception (if exists) that occured in error at specified index

getFirstError()

Get first error

getLineNumber( int)

Get the line number of error at specified index

getLocator()

Return the registered locator

getMessage( int)

Get the error message at specified index

getMessage( int, String[])

Get error message with more than 5 arguments

getMessage0( int)

Get error message with no arguments

getMessage1( int, String)

Get error message with 1 argument

getMessage3( int, String, String)

Get error message with 2arguments

getMessage3( int, String, String, String)

Get error message with 3 arguments

getMessage4( int, String, String, String, String)

Get error message with 4 arguments

getMessage5( int, String, String, String, String, String)

Get error message with 5 arguments

getMessageType( int)

Get the type of the error message at specified index

getNumMessages()

Return the total number of errors/warnings found during parsing

getPublicId( int)

Get the public ID of input when error at specified index occured

getSystemId( int)

Get the system ID of input when error at specified index occured

printErrorListener()

Flush all the JAXP 1.1 errors to the ErrorListener If no ErrorListener was set, default to System.err

reset()

Rset the error class

setErrorStream( OutputStream)

Register an output stream

setErrorStream( OutputStream, String)

Register an output stream

setErrorStream( PrintWriter)

Register an output stream

setException( Exception)

Register a exception

setLocale( Loacale)

Register a locale

setLocator( Locator)

Register a locator

showWarnings( boolean)

Turn reporting warning on/off

error(int, int, String)

Description

Adds a new error to the vector

Syntax

public void error(int id, int type, java.lang.String msg)

Parameters

id - - id of the error message

mesg - - error message (without paramters)

type - - type of the error

error(int, int, String[])

Description

Adds a new error to the vector

Syntax

public void error(int id, int type, java.lang.String[] p)

Parameters

id - - id of the error message

type - - type of the error

p - - paramter array

error0(int, int)

Description

Adds a new error to the vector

Syntax

public void error0(int id, int type)

Parameters

id - - id of the error message

type - - type of the error

error1(int, int, String)

Description

Adds a new error to the vector

Syntax

public void error1(int id, int type, java.lang.String p1)

Parameters

id - - id of the error message

type - - type of the error

p1 - - paramter 1

error2(int, int, String, String)

Description

Adds a new error to the vector

Syntax

public void error2(int id, int type, java.lang.String p1, java.lang.String p2)

Parameters

id - - id of the error message

type - - type of the error

p1 - - paramter 1

p2 - - paramter 2

error3(int, int, String, String, String)

Description

Adds a new error to the vector

Syntax

public void error3(int id, int type, java.lang.String p1, java.lang.String p2, 
java.lang.String p3)

Parameters

id - - id of the error message

type - - type of the error

p1 - - paramter 1

p2 - - paramter 2

p3 - - paramter 3

flushErrorStream()

Description

Flush all the error to the ouput stream output stream defaults or to error handler

Syntax

public void flushErrorStream()

formatErrorMesg(int)

Syntax

public java.lang.String formatErrorMesg(int index)

getColumnNumber(int)

Description

Get the column number of error at specified index

Syntax

public int getColumnNumber(int i)

Returns

The column number

getException(int)

Description

Get the exception (if exists) that occured in error at specified index

Syntax

public java.lang.Exception getException(int i)

Returns

The exception

getFirstError()

Syntax

public int getFirstError()

getLineNumber(int)

Description

Get the line number of error at specified index

Syntax

public int getLineNumber(int i)

Returns

The line number

getLocator()

Description

Return the registered locator

Syntax

public org.xml.sax.Locator getLocator()

Returns

locator

getMessage(int)

Description

Get the error message at specified index

Syntax

public java.lang.String getMessage(int i)

Returns

The error message

getMessage(int, String[])

Description

Get error message with more than 5 arguments

Syntax

public java.lang.String getMessage(int errId, java.lang.String[] params)

getMessage0(int)

Description

Get error message with no arguments

Syntax

public java.lang.String getMessage0(int errId)

getMessage1(int, String)

Description

Get error message with 1 arguments

Syntax

public java.lang.String getMessage1(int errId, java.lang.String a1)

getMessage2(int, String, String)

Description

Get error message with 2 arguments

Syntax

public java.lang.String getMessage2(int errId, java.lang.String a1, 
java.lang.String a2)

getMessage3(int, String, String, String)

Description

Get error message with 3 arguments

Syntax

public java.lang.String getMessage3(int errId, java.lang.String a1, 
java.lang.String a2, java.lang.String a3)

getMessage4(int, String, String, String, String)

Description

Get error message with 4 arguments

Syntax

public java.lang.String getMessage4(int errId, java.lang.String a1, 
java.lang.String a2, java.lang.String a3, java.lang.String a4)

getMessage5(int, String, String, String, String, String)

Description

Get error message with 5 arguments

Syntax

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)

getMessageType(int)

Description

Get the type of the error message at specified index

Syntax

public int getMessageType(int i)

Returns

The error message type

getNumMessages()

Description

Return the total number of errors/warnings found during parsing

Syntax

public int getNumMessages()

Returns

The number of errors/warnings

getPublicId(int)

Description

Get the public ID of input when error at specified index occured

Syntax

public java.lang.String getPublicId(int i)

Returns

The public ID

getSystemId(int)

Description

Get the system ID of input when error at specified index occured

Syntax

public java.lang.String getSystemId(int i)

Returns

The system ID

printErrorListener()

Description

Flush all the JAXP 1.1 errors to the ErrorListener If no ErrorListener was set, default to System.err

Syntax

public void printErrorListener()

reset()

Description

Reset the error class

Syntax

public void reset()

setErrorStream(OutputStream)

Description

Register an output stream

Syntax

public void setErrorStream(java.io.OutputStream out)

Parameters

out - - OutputStream to ouput the error/warnings

setErrorStream(OutputStream, String)

Description

Register an output stream

Syntax

public void setErrorStream(java.io.OutputStream out, java.lang.String enc)

Parameters

out - - OutputStream to ouput the error/warnings

enc - - Encoding of the outputstream

Throws

IOException - - if an error occurs initializing the outputstream

setErrorStream(PrintWriter)

Description

Register an output stream

Syntax

public void setErrorStream(java.io.PrintWriter out)

Parameters

out - - PrintWriter to ouput the error/warnings

setException(Exception)

Description

Register an exception

Syntax

public void setException(java.lang.Exception exp)

Parameters

exp - - last exception occured

setLocale(Locale)

Description

Register a locale

Syntax

public void setLocale(java.util.Locale locale)

Parameters

locale - - locale for error reporting

setLocator(Locator)

Description

Register a locator

Syntax

public void setLocator(org.xml.sax.Locator locator)

Parameters

locator - - locater to get lin/col/sysid/pubid info

showWarnings(boolean)

Description

Turn reporting warning on/off

Syntax

public void showWarnings(boolean flag)

Parameters

flag - - controls reporting of warnings


XMLException

Description

In package oracle.xml.util. Indicates that a parsing exception occurred while processing an XML document

Syntax

public class XMLException extends java.lang.Exception
 
java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--oracle.xml.util.XMLException

Implemented Interfaces

java.io.Serializable

Fields

Table 10-4  Fields of AttrDecl
Field Syntax Description

ERROR

public static final int ERROR

Code for non-fatal error

FATAL_ERROR

public static final int FATAL_ERROR

Code for fatal error

WARNING

public static final int WARNING

Code for warning


Constructors

XMLException(String, String, String, int, int, int)

Syntax

public  XMLException(java.lang.String mesg, java.lang.String pubId, 
java.lang.String sysId, int line, int col, int type)

XMLException(XMLError, Exception)

Syntax

public  XMLException(XMLError err, java.lang.Exception e)

XMLException(XMLError, int)

Syntax

public  XMLException(XMLError err, int firsterr)

XMLException(XMLError, int, Exception)

Syntax

public  XMLException(XMLError err, int firsterr, java.lang.Exception e)

Methods

Table 10-5  Summary of Methods of oracle.xml.util.XMLException
Method Description

formatErrorMessage( int)

Get the error message at specified index

getColumnNumber( int)

Get the column number of error at specified index

getException( int)

Get the exception (if exists) that occured in error at specified index

getLineNumber( int)

Get the line number of error at specified index

getMessage( int)

Get the error message at specified index

getMessageType( int)

Get the type of the error message at specified index

getNumMessages( int)

Return the total number of errors/warnings found during parsing

getPublicId( int)

Get the public ID of input when error at specified index occured

getSystemId( int)

Get the system ID of input when error at specified index occured

getXMLError

Get XMLError object inside XMLException.

printStackTrace()

Prints this Throwable and its backtrace to the standard error stream.

printStackTrace( PrintStream)

Prints this Throwable and its backtrace to the specified print stream.

printStackTrace( PrintWriter)

Prints this Throwable and its backtrace to the specified print writer.

setException( Exception)

Set the underlying exception (if exists)

toString()

Override toString to pick up aReturnsny embedded exception.

formatErrorMessage(int)

Description

Get the error message at specified index

Syntax

public java.lang.String formatErrorMessage(int i)

Returns

The error message

getColumnNumber(int)

Description

Get the column number of error at specified index

Syntax

public int getColumnNumber(int i)

Returns

The column number

getException(int)

Description

Get the exception (if exists) that occured in error at specified index

Syntax

public java.lang.Exception getException(int i)

Returns

The exception

getLineNumber(int)

Description

Get the line number of error at specified index

Syntax

public int getLineNumber(int i)

Returns

The line number

getMessage(int)

Get the error message at specified index

Description

Syntax

public java.lang.String getMessage(int i)

Returns

The error message

getMessageType(int)

Description

Get the type of the error message at specified index

Syntax

public int getMessageType(int i)

Returns

The error message type

getNumMessages()

Return the total number of errors/warnings found during parsing

Description

Syntax

public int getNumMessages()

Returns

The number of errors/warnings

getPublicId(int)

Description

Get the public ID of input when error at specified index occured

Syntax

public java.lang.String getPublicId(int i)

Returns

The public ID

getSystemId(int)

Description

Get the system ID of input when error at specified index occured

Syntax

public java.lang.String getSystemId(int i)

Returns

The system ID

getXMLError()

Description

Get XMLError object inside XMLException.

Syntax

public XMLError getXMLError()

Returns

the XMLError object.

printStackTrace()

Description

Prints this Throwable and its backtrace to the standard error stream.

Syntax

public void printStackTrace()

Overrides

java.lang.Throwable.printStackTrace() in class java.lang.Throwable

printStackTrace(PrintStream)

Description

Prints this Throwable and its backtrace to the specified print stream.

Syntax

public void printStackTrace(java.io.PrintStream s)

Overrides

java.lang.Throwable.printStackTrace(java.io.PrintStream) in class java.lang.Throwable

printStackTrace(PrintWriter)

Description

Prints this Throwable and its backtrace to the specified print writer.

Syntax

public void printStackTrace(java.io.PrintWriter s)

Overrides

java.lang.Throwable.printStackTrace(java.io.PrintWriter) in class java.lang.Throwable

setException(Exception)

Description

Set the underlying exception (if exists)

Syntax

public void setException(java.lang.Exception ex)

Parameters

ex - exception

toString()

Description

Override toString to pick up aReturnsny embedded exception.

public java.lang.String toString()

Overrides

java.lang.Throwable.toString() in class java.lang.Throwable

Returns

A string representation of this exception


Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback