SAXParseException (Org.XML.SAX Package)

Extends SaxException. Encapsulates 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 the following for methods.

getColumnNumber

The column number of the end of the text where the exception occurred. The first column in a line is position 1.

Syntax:

public int getColumnNumber()

Return value:

An integer representing the column number, or -1 if none is available.

getLineNumber

The line number at the end of the text where the exception occurred.

Syntax:

public int getLineNumber()

Return value:

An integer representing the line number, or -1 if none is available.

getPublicID

Gets the public identifier of the entity where the exception occurred.

Syntax:

public java.lang.String getPublicId()

Return value:

A string containing the public identifier, or null if none is available.

getSystemID

Gets the system identifier of the entity where the exception occurred. If the system identifier is a URL, it will be resolved fully.

Syntax:

public java.lang.String getSystemId()

Return value:

A string containing the system identifier, or null if none is available.