# XML:Locator

### Import List

        XML:DTD
        XML:Error
        XML:UnicodeBuffer

Class List
ErrorListener | Using the ErrorListener instance provided by the parser, builders and applications can add their own error messages to a document.
Position |

Class Summary: ErrorListener [Detail]

      +--XML:Locator.ErrorListener

Using the ErrorListener instance provided by the parser, builders and applications can add their own error messages to a document.

Method Summary
Error(Context, Code, BOOLEAN, Position): Msg Adds a new error message to the parser error list.

Class Summary: Position [Detail]

      +--XML:Locator.Position

Field Summary
charIndex: CharPos The character index of the starting position associated with a callback event, based on the UCS-2 character encoding.
column: CharPos Column number of the character.
entity: ExternalEntity The current file entity (document entity, external DTD subset, or external entity).
inInternalEntity: InternalEntity If the parsing is within the replacement text of an internal entity, this field refers to the innermost entity.
line: CharPos Line number of the character.

Class Detail: ErrorListener

Method Detail

### Error

    PROCEDURE (el: ErrorListener) Error(context: Context;
                    code: Code;
                    fatalError: BOOLEAN;
                    pos: Position): Msg

> Adds a new error message to the parser error list. context and code determine the message text. If fatalError is TRUE, then the parser should stop reporting any events to the application. pos indicates the position of the error. It should be taken from a locator.

Class Detail: Position

Field Detail

### charIndex

    FIELD charIndex: CharPos

> The character index of the starting position associated with a callback event, based on the UCS-2 character encoding. This position is relative to the beginning of the current file (document entity, external DTD subset, or external entity), and begins with character index 0.

> Please note that this number may differ from the number of Unicode characters before the given index, if the file contains characters with code values over 0xFFFF, which are encoded as two Unicode characters.

> For a character position reported in an error message, the actual value is incremented by Error.errMsgCharPosBase.

### column

    FIELD column: CharPos

> Column number of the character. Counting begins at zero. Currently, surrogate pairs are counted as two separate characters. For a column number reported in an error message, the actual value is incremented by Error.errMsgColumnBase.

### entity

    FIELD entity: ExternalEntity

> The current file entity (document entity, external DTD subset, or external entity). Using this reference, the public identifier, the system identifier, and the base URI can be determined.

### inInternalEntity

    FIELD inInternalEntity: InternalEntity

> If the parsing is within the replacement text of an internal entity, this field refers to the innermost entity. It is NIL as long as the parser is working on the top-most file level.

### line

    FIELD line: CharPos

> Line number of the character. Counting begins at zero. For a line number reported in an error message, the actual value is incremented by Error.errMsgLineBase.