FileDocCategorySizeDatePackage
XMLParseException.javaAPI DocJava SE 6 API5363Tue Jun 10 00:22:54 BST 2008com.sun.org.apache.xerces.internal.xni.parser

XMLParseException

public class XMLParseException extends XNIException
A parsing exception. This exception is different from the standard XNI exception in that it stores the location in the document (or its entities) where the exception occurred.
author
Andy Clark, IBM
version
$Id: XMLParseException.java,v 1.2.6.1 2005/09/06 08:31:43 neerajbj Exp $

Fields Summary
static final long
serialVersionUID
Serialization version.
protected String
fPublicId
Public identifier.
protected String
fLiteralSystemId
literal System identifier.
protected String
fExpandedSystemId
expanded System identifier.
protected String
fBaseSystemId
Base system identifier.
protected int
fLineNumber
Line number.
protected int
fColumnNumber
Column number.
protected int
fCharacterOffset
Character offset.
Constructors Summary
public XMLParseException(XMLLocator locator, String message)
Constructs a parse exception.


    //
    // Constructors
    //

         
         
        super(message);
        if (locator != null) {
            fPublicId = locator.getPublicId();
            fLiteralSystemId = locator.getLiteralSystemId();
            fExpandedSystemId = locator.getExpandedSystemId();
            fBaseSystemId = locator.getBaseSystemId();
            fLineNumber = locator.getLineNumber();
            fColumnNumber = locator.getColumnNumber();
            fCharacterOffset = locator.getCharacterOffset();
        }
    
public XMLParseException(XMLLocator locator, String message, Exception exception)
Constructs a parse exception.

        super(message, exception);
        if (locator != null) {
            fPublicId = locator.getPublicId();
            fLiteralSystemId = locator.getLiteralSystemId();
            fExpandedSystemId = locator.getExpandedSystemId();
            fBaseSystemId = locator.getBaseSystemId();
            fLineNumber = locator.getLineNumber();
            fColumnNumber = locator.getColumnNumber();
            fCharacterOffset = locator.getCharacterOffset();
        }
    
Methods Summary
public java.lang.StringgetBaseSystemId()
Returns the base system identifier.

        return fBaseSystemId;
    
public intgetCharacterOffset()
Returns the character offset.

        return fCharacterOffset;
    
public intgetColumnNumber()
Returns the row number.

        return fColumnNumber;
    
public java.lang.StringgetExpandedSystemId()
Returns the expanded system identifier.

        return fExpandedSystemId;
    
public intgetLineNumber()
Returns the line number.

        return fLineNumber;
    
public java.lang.StringgetLiteralSystemId()
Returns the literal system identifier.

        return fLiteralSystemId;
    
public java.lang.StringgetPublicId()
Returns the public identifier.

        return fPublicId;
    
public java.lang.StringtoString()
Returns a string representation of this object.


        StringBuffer str = new StringBuffer();
        if (fPublicId != null) {
            str.append(fPublicId);
        }
        str.append(':");
        if (fLiteralSystemId != null) {
            str.append(fLiteralSystemId);
        }
        str.append(':");
        if (fExpandedSystemId != null) {
            str.append(fExpandedSystemId);
        }
        str.append(':");
        if (fBaseSystemId != null) {
            str.append(fBaseSystemId);
        }
        str.append(':");
        str.append(fLineNumber);
        str.append(':");
        str.append(fColumnNumber);
        str.append(':");
        str.append(fCharacterOffset);
        str.append(':");
        String message = getMessage();
        if (message == null) {
            Exception exception = getException();
            if (exception != null) {
                message = exception.getMessage();
            }
        }
        if (message != null) {
            str.append(message);
        }
        return str.toString();