http://xml.apache.org/http://www.apache.org/http://www.w3.org/

Home

Readme
Release Info

Installation
Download
Build

FAQs
Samples
API Docs

DOM C++ Binding
Programming
Migration Guide

Feedback
Bug-Reporting
PDF Document

CVS Repository
Mail Archive

API Docs for SAX and DOM
 

Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

SAXParseException Class Reference

Encapsulate an XML parse error or warning. More...

Inheritance diagram for SAXParseException:

Inheritance graph
[legend]
Collaboration diagram for SAXParseException:

Collaboration graph
[legend]
List of all members.

Public Methods

Constructors and Destructor
 SAXParseException (const XMLCh *const message, const Locator &locator, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)
 Create a new SAXParseException from a message and a Locator. More...

 SAXParseException (const XMLCh *const message, const XMLCh *const publicId, const XMLCh *const systemId, const XMLSSize_t lineNumber, const XMLSSize_t columnNumber, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)
 Create a new SAXParseException. More...

 SAXParseException (const SAXParseException &toCopy)
 Copy constructor. More...

 ~SAXParseException ()
 Destructor. More...

Assignment operator
SAXParseException & operator= (const SAXParseException &toAssign)
 Assignment operator. More...

Getter methods
XMLSSize_t getColumnNumber () const
 The column number of the end of the text where the exception occurred. More...

XMLSSize_t getLineNumber () const
 The line number of the end of the text where the exception occurred. More...

const XMLCh * getPublicId () const
 Get the public identifier of the entity where the exception occurred. More...

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


Detailed Description

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.

See also:
SAXException::SAXException , Locator::Locator , ErrorHandler::ErrorHandler


Constructor & Destructor Documentation

SAXParseException::SAXParseException const XMLCh *const    message,
const Locator   locator,
MemoryManager *const    manager = XMLPlatformUtils::fgMemoryManager
 

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.
manager  Pointer to the memory manager to be used to allocate objects.
See also:
Locator::Locator , Parser::setLocale

SAXParseException::SAXParseException const XMLCh *const    message,
const XMLCh *const    publicId,
const XMLCh *const    systemId,
const XMLSSize_t    lineNumber,
const XMLSSize_t    columnNumber,
MemoryManager *const    manager = XMLPlatformUtils::fgMemoryManager
 

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.
manager  Pointer to the memory manager to be used to allocate objects.
See also:
Parser::setLocale

SAXParseException::SAXParseException const SAXParseException &    toCopy
 

Copy constructor.

Parameters:
toCopy  The object to be copied

SAXParseException::~SAXParseException  
 

Destructor.


Member Function Documentation

XMLSSize_t SAXParseException::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:
Locator::getColumnNumber

XMLSSize_t SAXParseException::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:
Locator::getLineNumber

const XMLCh* SAXParseException::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:
Locator::getPublicId

const XMLCh* SAXParseException::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:
Locator::getSystemId

SAXParseException& SAXParseException::operator= const SAXParseException &    toAssign
 

Assignment operator.

Parameters:
toAssign  The object to be copied through assignment


The documentation for this class was generated from the following file:


Copyright © 1994-2004 The Apache Software Foundation. All Rights Reserved.