Oracle® XML Java API Reference
Release 1 (10.1)

B12024-01

oracle.xml.parser.v2
Class XMLError

java.lang.Object
  |
  +--oracle.xml.util.XMLError
        |
        +--oracle.xml.parser.v2.XMLError
All Implemented Interfaces:
DOMError

public class XMLError
extends XMLError
implements DOMError

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


Field Summary

 

Fields inherited from class oracle.xml.util.XMLError
col, errid, exp, line, mesg, pubId, sysId, types

 

Fields inherited from interface org.w3c.dom.DOMError
SEVERITY_ERROR, SEVERITY_FATAL_ERROR, SEVERITY_WARNING

 

Constructor Summary
XMLError()
          Default constructor

 

Method Summary
 void error(int line, int col, java.lang.String pubId, java.lang.String sysId, java.lang.String mesg, int id, int type, boolean stop)
          Adds a new error to the vector
 void flushErrors()
          Flush all the error to the ouput stream output stream defaults or to error handler
 void flushErrors1()
           
 void flushNodes(java.lang.String errMsg, java.lang.String val)
          Set the properties for the nodes where validation error occured.
 boolean getDOMErrorOption()
          Gets the flag for DOM Errors to be returned.
 ErrorHandler getErrorHandler()
          Return register error handler
 java.util.Vector getListTrees()
          This method returns the list of stacks that was built with the nodes where the schema validation failed
 void setDOMErrorOption(boolean docerrflag)
          Sets the flag for DOM Errors to be returned.
 void setErrorHandler(ErrorHandler err)
          Register error handler
 void setLocation(DOMLocator location)
          Set the DOM Locator

 

Methods inherited from class oracle.xml.util.XMLError
error, error, error0, error1, error2, error3, flushErrorStream, formatErrorMesg, getColumnNumber, getException, getFirstError, getLineNumber, getLocator, getMessage, getMessage, getMessage0, getMessage1, getMessage2, getMessage3, getMessage4, getMessage5, getMessageType, getNumMessages, getPublicId, getSystemId, printErrorListener, reset, setErrorStream, setErrorStream, setErrorStream, setException, setLocale, setLocator, showWarnings

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Methods inherited from interface org.w3c.dom.DOMError
getLocation, getMessage, getRelatedData, getRelatedException, getSeverity, getType

 

Constructor Detail

XMLError

public XMLError()
Default constructor
Method Detail

setErrorHandler

public void setErrorHandler(ErrorHandler err)
Register error handler
Parameters:
err - - ErrorHandler

getErrorHandler

public ErrorHandler getErrorHandler()
Return register error handler
Returns:
ErrorHandler

error

public void error(int line,
                  int col,
                  java.lang.String pubId,
                  java.lang.String sysId,
                  java.lang.String mesg,
                  int id,
                  int type,
                  boolean stop)
           throws XMLParseException
Adds a new error to the vector
Parameters:
line - the line number where error occurs
col - the column number where the error occurs
pubId - the public Identifier
sysId - the system identifier
mesg - the error message
id - the error id
type - the error type
stop - boolean to indicate if the processing needs to be stopped.
Throws:
XMLParseException - in case of a fatal error

flushErrors

public void flushErrors()
                 throws XMLParseException
Flush all the error to the ouput stream output stream defaults or to error handler
Throws:
XMLParseException - in case of a fatal error

flushErrors1

public void flushErrors1()
                  throws XMLParseException,
SAXParseException,
SAXException,
                         java.io.IOException
XMLParseException
SAXParseException
SAXException
java.io.IOException

flushNodes

public void flushNodes(java.lang.String errMsg,
                       java.lang.String val)
Set the properties for the nodes where validation error occured. Flush the XMLNode objects from the locator and add them to a a stack.Finally, the stack is added to a Vector which keeps track all the nodes where Validation failed.
Parameters:
errMsg - - Error message returned from validator
val - - Node/Attribute name.

getListTrees

public java.util.Vector getListTrees()
This method returns the list of stacks that was built with the nodes where the schema validation failed

setDOMErrorOption

public void setDOMErrorOption(boolean docerrflag)
Sets the flag for DOM Errors to be returned. This flag should be used only when trying to validate an already parsed document
Parameters:
docerrflag - - boolean
Returns:
- none

getDOMErrorOption

public boolean getDOMErrorOption()
Gets the flag for DOM Errors to be returned. This flag should be used only when trying to validate a parsed XML document
Returns:
docerrflag - boolean

setLocation

public void setLocation(DOMLocator location)
Set the DOM Locator
Parameters:
location - DOMLocator

Oracle® XML Java API Reference
Release 1 (10.1)

B12024-01

Copyright © 2003, Oracle. All Rights Reserved.