APIdia Launch Partner
Top Description Fields Methods
com.sun.org.apache.xml.internal.serializer

public Interface SerializerTrace

Imports
org.xml.sax.Attributes

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

Field Summary

Modifier and TypeField and Description
public static final int
EVENTTYPE_CDATA

Event type generated after CDATA is generated.

public static final int
EVENTTYPE_CHARACTERS

Event type generated for character data (CDATA and Ignorable Whitespace have their own events).

public static final int
EVENTTYPE_COMMENT

Event type generated after a comment has been added.

public static final int
EVENTTYPE_ENDDOCUMENT

Event type generated when a document ends.

public static final int
EVENTTYPE_ENDELEMENT

Event type generated when an element ends, after it's children have been added.

public static final int
EVENTTYPE_ENTITYREF

Event type generate after an entity ref is created.

public static final int
EVENTTYPE_IGNORABLEWHITESPACE

Event type generated for ignorable whitespace (I'm not sure how much this is actually called.

public static final int
EVENTTYPE_OUTPUT_CHARACTERS

Event type generated when characters are written to an output stream.

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.

public static final int
EVENTTYPE_PI

Event type generated for processing instructions.

public static final int
EVENTTYPE_STARTDOCUMENT

Event type generated when a document begins.

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 Summary

Modifier and TypeMethod and Description
public void
fireGenerateEvent(int
One of the EVENTTYPE_XXX constants.
eventType
)

Fire startDocument, endDocument events.

public void
fireGenerateEvent(int
One of the EVENTTYPE_XXX constants.
eventType
,
String
The name of the element.
name
,
Attributes
The SAX attribute list.
atts
)

Fire startElement, endElement events.

public void
fireGenerateEvent(int
One of the EVENTTYPE_XXX constants.
eventType
,
char[]
The char array from the SAX event.
ch
,
int
The start offset to be used in the char array.
start
,
int
The end offset to be used in the chara array.
length
)

Fire characters, cdata events.

public void
fireGenerateEvent(int
One of the EVENTTYPE_XXX constants.
eventType
,
String
The name of the processing instruction.
name
,
String
The processing instruction data.
data
)

Fire processingInstruction events.

public void
fireGenerateEvent(int
One of the EVENTTYPE_XXX constants.
eventType
,
String
The comment or entity ref data.
data
)

Fire comment and entity ref events.

public boolean

Returns:

True if there are trace listeners
hasTraceListeners
()

Tell if trace listeners are present.

Field Detail

EVENTTYPE_CDATAback to summary
public static final int EVENTTYPE_CDATA

Event type generated after CDATA is generated.

EVENTTYPE_CHARACTERSback to summary
public static final int EVENTTYPE_CHARACTERS

Event type generated for character data (CDATA and Ignorable Whitespace have their own events).

EVENTTYPE_COMMENTback to summary
public static final int EVENTTYPE_COMMENT

Event type generated after a comment has been added.

EVENTTYPE_ENDDOCUMENTback to summary
public static final int EVENTTYPE_ENDDOCUMENT

Event type generated when a document ends.

EVENTTYPE_ENDELEMENTback to summary
public static final int EVENTTYPE_ENDELEMENT

Event type generated when an element ends, after it's children have been added.

EVENTTYPE_ENTITYREFback to summary
public static final int EVENTTYPE_ENTITYREF

Event type generate after an entity ref is created.

EVENTTYPE_IGNORABLEWHITESPACEback to summary
public static final int EVENTTYPE_IGNORABLEWHITESPACE

Event type generated for ignorable whitespace (I'm not sure how much this is actually called.

EVENTTYPE_OUTPUT_CHARACTERSback to summary
public static final int EVENTTYPE_OUTPUT_CHARACTERS

Event type generated when characters are written to an output stream.

EVENTTYPE_OUTPUT_PSEUDO_CHARACTERSback to summary
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_PIback to summary
public static final int EVENTTYPE_PI

Event type generated for processing instructions.

EVENTTYPE_STARTDOCUMENTback to summary
public static final int EVENTTYPE_STARTDOCUMENT

Event type generated when a document begins.

EVENTTYPE_STARTELEMENTback to summary
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

fireGenerateEventback to summary
public void fireGenerateEvent(int eventType)

Fire startDocument, endDocument events.

Parameters
eventType:int

One of the EVENTTYPE_XXX constants.

fireGenerateEventback to summary
public void fireGenerateEvent(int eventType, String name, Attributes atts)

Fire startElement, endElement events.

Parameters
eventType:int

One of the EVENTTYPE_XXX constants.

name:String

The name of the element.

atts:Attributes

The SAX attribute list.

fireGenerateEventback to summary
public void fireGenerateEvent(int eventType, char[] ch, int start, int length)

Fire characters, cdata events.

Parameters
eventType:int

One of the EVENTTYPE_XXX constants.

ch:char[]

The char array from the SAX event.

start:int

The start offset to be used in the char array.

length:int

The end offset to be used in the chara array.

fireGenerateEventback to summary
public void fireGenerateEvent(int eventType, String name, String data)

Fire processingInstruction events.

Parameters
eventType:int

One of the EVENTTYPE_XXX constants.

name:String

The name of the processing instruction.

data:String

The processing instruction data.

fireGenerateEventback to summary
public void fireGenerateEvent(int eventType, String data)

Fire comment and entity ref events.

Parameters
eventType:int

One of the EVENTTYPE_XXX constants.

data:String

The comment or entity ref data.

hasTraceListenersback to summary
public boolean hasTraceListeners()

Tell if trace listeners are present.

Returns:boolean

True if there are trace listeners