Interface XMLEventListener

All Superinterfaces:
XMLEventListenerStates
All Known Subinterfaces:
StatefulXMLEventListener
All Known Implementing Classes:
XMLOutputter

public interface XMLEventListener extends XMLEventListenerStates
Interface for XML event listeners.

State transitions

XML event sources must obey a state model when calling XMLEventListeners. However, an XMLEventListener is not required to check that this state model is actually respected. If it does, then it will throw an IllegalStateException if the state model is violated.

Stateful XMLEventListener implementations should implement the StatefulXMLEventListener interface instead of implementing XMLEventListener directly.

Initially the state of an uninitialized XMLEventListener is UNINITIALIZED.

The following table defines how the state changes when a certain method is called in a certain state. Horizontally are the current states, vertically the notification methods. The cells self contain the new state.

S0 S1 S2 S3 S4 S5 S6
declaration() S1 ISE ISE ISE ISE ISE ISE
dtd(String,String,String) S2 S2 ISE ISE ISE ISE ISE
startTag(String) S3 S3 S3 S3 S3 ISE ISE
attribute(String,String) ISE ISE ISE S3 ISE ISE ISE
endTag() ISE ISE ISE S4/S5 S4/S5 ISE ISE
pcdata(String) ISE ISE ISE S4 S4 ISE ISE
pcdata(char[],int,int) ISE ISE ISE S4 S4 ISE ISE
cdata(String) ISE ISE ISE S4 S4 ISE ISE
whitespace(String) S1 S1 S4 S4 S4 S5 ISE
whitespace(char[],int,int) S1 S1 S4 S4 S4 S5 ISE
comment(String) S1 S1 S4 S4 S4 S5 ISE
pi(String,String) S1 S1 S4 S4 S4 S5 ISE
endDocument() ISE ISE ISE S6 S6 S6 ISE

List of states as used in the table:

Since:
xmlenc 0.30
Version:
$Revision: 1.9 $ $Date: 2005/09/12 08:40:02 $
Author:
Ernst de Haan (wfe.dehaan@gmail.com)