org.apache.xml.serializer

Interface SerializerTrace

public interface SerializerTrace

This interface defines a set of integer constants that identify trace event types.

UNKNOWN: internal

Field Summary
static intEVENTTYPE_CDATA
Event type generated after CDATA is generated.
static intEVENTTYPE_CHARACTERS
Event type generated for character data (CDATA and Ignorable Whitespace have their own events).
static intEVENTTYPE_COMMENT
Event type generated after a comment has been added.
static intEVENTTYPE_ENDDOCUMENT
Event type generated when a document ends.
static intEVENTTYPE_ENDELEMENT
Event type generated when an element ends, after it's children have been added.
static intEVENTTYPE_ENTITYREF
Event type generate after an entity ref is created.
static intEVENTTYPE_IGNORABLEWHITESPACE
Event type generated for ignorable whitespace (I'm not sure how much this is actually called.
static intEVENTTYPE_OUTPUT_CHARACTERS
Event type generated when characters are written to an output stream.
static intEVENTTYPE_OUTPUT_PSEUDO_CHARACTERS
Event type generated when characters might be written to an output stream, but these characters never are.
static intEVENTTYPE_PI
Event type generated for processing instructions.
static intEVENTTYPE_STARTDOCUMENT
Event type generated when a document begins.
static intEVENTTYPE_STARTELEMENT
Event type generated when an element begins (after the attributes have been processed but before the children have been added).
Method Summary
voidfireGenerateEvent(int eventType)
Fire startDocument, endDocument events.
voidfireGenerateEvent(int eventType, String name, Attributes atts)
Fire startElement, endElement events.
voidfireGenerateEvent(int eventType, char[] ch, int start, int length)
Fire characters, cdata events.
voidfireGenerateEvent(int eventType, String name, String data)
Fire processingInstruction events.
voidfireGenerateEvent(int eventType, String data)
Fire comment and entity ref events.
booleanhasTraceListeners()
Tell if trace listeners are present.

Field Detail

EVENTTYPE_CDATA

public static final int EVENTTYPE_CDATA
Event type generated after CDATA is generated.

EVENTTYPE_CHARACTERS

public static final int EVENTTYPE_CHARACTERS
Event type generated for character data (CDATA and Ignorable Whitespace have their own events).

EVENTTYPE_COMMENT

public static final int EVENTTYPE_COMMENT
Event type generated after a comment has been added.

EVENTTYPE_ENDDOCUMENT

public static final int EVENTTYPE_ENDDOCUMENT
Event type generated when a document ends.

EVENTTYPE_ENDELEMENT

public static final int EVENTTYPE_ENDELEMENT
Event type generated when an element ends, after it's children have been added.

EVENTTYPE_ENTITYREF

public static final int EVENTTYPE_ENTITYREF
Event type generate after an entity ref is created.

EVENTTYPE_IGNORABLEWHITESPACE

public static final int EVENTTYPE_IGNORABLEWHITESPACE
Event type generated for ignorable whitespace (I'm not sure how much this is actually called.

EVENTTYPE_OUTPUT_CHARACTERS

public static final int EVENTTYPE_OUTPUT_CHARACTERS
Event type generated when characters are written to an output stream.

EVENTTYPE_OUTPUT_PSEUDO_CHARACTERS

public static final int EVENTTYPE_OUTPUT_PSEUDO_CHARACTERS
Event type generated when characters might be written to an output stream, but these characters never are. They will ultimately be written out via EVENTTYPE_OUTPUT_CHARACTERS. This type is used as attributes are collected. Whenever the attributes change this event type is fired. At the very end however, when the attributes do not change anymore and are going to be ouput to the document the real characters will be written out using the EVENTTYPE_OUTPUT_CHARACTERS.

EVENTTYPE_PI

public static final int EVENTTYPE_PI
Event type generated for processing instructions.

EVENTTYPE_STARTDOCUMENT

public static final int EVENTTYPE_STARTDOCUMENT
Event type generated when a document begins.

EVENTTYPE_STARTELEMENT

public static final int EVENTTYPE_STARTELEMENT
Event type generated when an element begins (after the attributes have been processed but before the children have been added).

Method Detail

fireGenerateEvent

public void fireGenerateEvent(int eventType)
Fire startDocument, endDocument events.

Parameters: eventType One of the EVENTTYPE_XXX constants.

fireGenerateEvent

public void fireGenerateEvent(int eventType, String name, Attributes atts)
Fire startElement, endElement events.

Parameters: eventType One of the EVENTTYPE_XXX constants. name The name of the element. atts The SAX attribute list.

fireGenerateEvent

public void fireGenerateEvent(int eventType, char[] ch, int start, int length)
Fire characters, cdata events.

Parameters: eventType One of the EVENTTYPE_XXX constants. ch The char array from the SAX event. start The start offset to be used in the char array. length The end offset to be used in the chara array.

fireGenerateEvent

public void fireGenerateEvent(int eventType, String name, String data)
Fire processingInstruction events.

Parameters: eventType One of the EVENTTYPE_XXX constants. name The name of the processing instruction. data The processing instruction data.

fireGenerateEvent

public void fireGenerateEvent(int eventType, String data)
Fire comment and entity ref events.

Parameters: eventType One of the EVENTTYPE_XXX constants. data The comment or entity ref data.

hasTraceListeners

public boolean hasTraceListeners()
Tell if trace listeners are present.

Returns: True if there are trace listeners

Copyright © 2005 Apache XML Project. All Rights Reserved.