FileDocCategorySizeDatePackage
SAXParseException.javaAPI DocphoneME MR2 API (J2ME)5034Wed May 02 18:00:34 BST 2007org.xml.sax

SAXParseException

public class SAXParseException extends SAXException
Encapsulate an XML parse error or warning.
This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY.

This exception will include information for locating the error in the original XML document. Note that although the application will receive a SAXParseException, 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 {@link org.xml.sax.SAXException SAXException}, it inherits the ability to wrap another exception.

since
SAX 1.0
version
2.0
see
org.xml.sax.SAXException
see
org.xml.sax.Locator

Fields Summary
private String
publicId
private String
systemId
private int
lineNumber
private int
columnNumber
Constructors Summary
public SAXParseException(String message, Locator locator)
Create a new SAXParseException from a message and a Locator.

param
message The error or warning message.
param
locator The locator object for the error or warning (may be null).
see
org.xml.sax.Locator

  	  super(message);
      
      if (locator != null) {
          this.publicId = locator.getPublicId();
          this.systemId = locator.getSystemId();
          this.lineNumber = locator.getLineNumber();
          this.columnNumber = locator.getColumnNumber();
      } else {
          this.lineNumber   = -1;
          this.columnNumber = -1;
      }
    
Methods Summary
public intgetColumnNumber()
The column number of the end of the text where the exception occurred.

The first column in a line is position 1.

return
An integer representing the column number, or -1 if none is available.
see
org.xml.sax.Locator#getColumnNumber

	return this.columnNumber;
    
public intgetLineNumber()
The line number of the end of the text where the exception occurred.

return
An integer representing the line number, or -1 if none is available.
see
org.xml.sax.Locator#getLineNumber

	return this.lineNumber;
    
public java.lang.StringgetPublicId()
Get the public identifier of the entity where the exception occurred.

return
A string containing the public identifier, or null if none is available.
see
org.xml.sax.Locator#getPublicId

	return this.publicId;
    
public java.lang.StringgetSystemId()
Get the system identifier of the entity where the exception occurred.

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

return
A string containing the system identifier, or null if none is available.
see
org.xml.sax.Locator#getSystemId

	return this.systemId;