class SAXParseException : public SAXException

Encapsulate an XML parse error or warning

Inheritance:


Public

Constructors and Destructor
SAXParseException (const XMLCh* const message, const Locator& locator)
Create a new SAXParseException from a message and a Locator
SAXParseException ( const XMLCh* const message, const XMLCh* const publicId, const XMLCh* const systemId, const unsigned int lineNumber, const unsigned int columnNumber )
Create a new SAXParseException
~SAXParseException ()
Destructor
Getter methods
unsigned int getColumnNumber () const
The column number of the end of the text where the exception occurred
unsigned int getLineNumber () const
The line number of the end of the text where the exception occurred
const XMLCh* getPublicId () const
Get the public identifier of the entity where the exception occurred
const XMLCh* getSystemId () const
Get the system identifier of the entity where the exception occurred

Inherited from SAXException:


Documentation

Encapsulate an XML parse error or warning.

This exception will include information for locating the error in the original XML document. Note that although the application will receive a SAXParseException as the argument to the handlers in the ErrorHandler interface, the application is not actually required to throw the exception; instead, it can simply read the information in it and take a different action.

Since this exception is a subclass of SAXException, it inherits the ability to wrap another exception.

$Log: SAXParseException.hpp,v $ Revision 1.1.1.1 1999/11/09 01:07:47 twl Initial checkin Revision 1.2 1999/11/08 20:45:02 rahul Swat for adding in Product name and CVS comment log variable.
Constructors and Destructor

SAXParseException(const XMLCh* const message, const Locator& locator)
Create a new SAXParseException from a message and a Locator.

This constructor is especially useful when an application is creating its own exception from within a DocumentHandler callback.

Parameters:
message - The error or warning message.
locator - The locator object for the error or warning.
See Also:
Locator
setLocale

SAXParseException( const XMLCh* const message, const XMLCh* const publicId, const XMLCh* const systemId, const unsigned int lineNumber, const unsigned int columnNumber )
Create a new SAXParseException.

This constructor is most useful for parser writers.

If the system identifier is a URL, the parser must resolve it fully before creating the exception.

Parameters:
message - The error or warning message.
publicId - The public identifer of the entity that generated the error or warning.
systemId - The system identifer of the entity that generated the error or warning.
lineNumber - The line number of the end of the text that caused the error or warning.
columnNumber - The column number of the end of the text that caused the error or warning.
See Also:
setLocale

~SAXParseException()
Destructor

Getter methods

unsigned int getColumnNumber() const
The column number of the end of the text where the exception occurred.

The first column in a line is position 1.

Returns:
An integer representing the column number, or -1 if none is available.
See Also:
getColumnNumber

unsigned int getLineNumber() const
The line number of the end of the text where the exception occurred.
Returns:
An integer representing the line number, or -1 if none is available.
See Also:
getLineNumber

const XMLCh* getPublicId() const
Get the public identifier of the entity where the exception occurred.
Returns:
A string containing the public identifier, or null if none is available.
See Also:
getPublicId

const XMLCh* getSystemId() const
Get the system identifier of the entity where the exception occurred.

If the system identifier is a URL, it will be resolved fully.

Returns:
A string containing the system identifier, or null if none is available.
See Also:
getSystemId

unsigned int fColumnNumber
The column in the source text where the error occured

unsigned int fLineNumber
The line in the source text where the error occured

XMLCh* fPublicId
The public id of the file where the error occured

XMLCh* fSystemId
The system id of the file where the error occured


This class has no child classes.
See Also:
SAXException
Locator
ErrorHandler

alphabetic index hierarchy of classes


XML Parser for C++ 2.0
Copyright © IBM Corp, 1999
Center for Java Technology
10275 N. De Anza Blvd.
Cupertino CA 95014 USA
Email: xml4c@us.ibm.com

IBM Logo