XML technologies / XML / XML in a Nutshell / DOM reference / Object reference / DOMError

(Excerpt from "XML in a Nutshell" by Elliotte Rusty Harold & W. Scott Means)

This interface defines an object containing information about errors occurring during DOM operations. It is used as a parameter to the callback method DOMErrorHandler.handleError( ).

 

Attributes

The object DOMError has the following attributes:

 

location: DOMLocator(3)

Contains information about where the error occurred in the original XML document and within the DOM tree. Read-only.

Java binding
public DOMLocator getLocation( );

 

message: DOMString(3)

A message generated by the DOM implementation describing the error. Read-only.

Java binding
public String getMessage( );

 

relatedData: DOMObject (3)

Depending on the attribute type this object probably contains a reference to the DOM Node object that caused the error.

Java binding
public Object getRelatedData( )

 

relatedException: DOMObject (3)

If the error results from a platform-specific exception, this attribute contains a reference to the exception object in question.

Java binding
public Object getRelatedException( )

 

severity: unsigned short (3)

This attribute contains the error’s severity, specified by one of the constants in the following table:

Schweregrad-Konstante

Wert

Bedeutung

SEVERITY_WARNING

1

Das ist eine Fehlermeldung, die nur zur »Information« dient. Die DOM-Verarbeitung kann normal weitergehen.

SEVERITY_ERROR

2

Das ist wahrscheinlich ein reparabler Fehler (wie ein Schema-Validierungsproblem in einem ansonsten wohlgeformten Dokument).

SEVERITY_FATAL_ERROR

3

Ein nicht-behebbarer Fehler (wie ein Wohlgeformtheitsproblem) ist aufgetreten.

Java binding
public short getSeverity( )

 

type: DOMString (3)

The value of the attribute type determines the type of object reference that appears in the attribute relatedData.

Java binding
public String getType( )

 

Methods

The object DOMError has no methods.

  

 

 

 

back to top