People overriding this class are cautioned to ensure that the implementation
of the cleanUp() method resets to a virgin state. The cleanUp() method will
be called when this SAXHandler is reset(), which may happen multiple times
between parses. The cleanUp() method must ensure that there are no references
remaining to any external instances.

Overriding of this class is permitted to allow for different handling of SAX
events. Once you have created a subclass of this, you also need to create a
custom implementation of SAXHandlerFactory to supply your instances
to SAXBuilder

If the XMLReader producing the SAX Events supports a document Locator, then
this instance will use the locator to supply the line and column data from
the SAX locator to the JDOMFactory. Note: the SAX
specification for the SAX Locator indicates that the line and column
represent the position of the end of the SAX Event. For
example, the line and column of the simple XML <root />
would be line 1, column 9.

SAXHandler

This will create a new SAXHandler that listens to SAX events
and creates a JDOM Document. The objects will be constructed using the
provided factory.

Parameters:

factory - JDOMFactory to be used for constructing objects

Method Detail

resetSubCLass

protected void resetSubCLass()

Override this method if you are a subclasser, and you want to clear the
state of your SAXHandler instance in preparation for a new parse.

reset

public final void reset()

Restore this SAXHandler to a clean state ready for another parse round.
All internal variables are cleared to an initialized state, and then the
resetSubClass() method is called to clear any methods that a subclass may
need to have reset.

setIgnoringElementContentWhitespace

Specifies whether or not the parser should elminate whitespace in element
content (sometimes known as "ignorable whitespace") when building the
document. Only whitespace which is contained within element content that
has an element only content model will be eliminated (see XML Rec 3.2.1).
For this setting to take effect requires that validation be turned on.
The default value of this setting is false.

startElement

This reports the occurrence of an actual element. It will include the
element's attributes, with the exception of XML vocabulary specific
attributes, such as xmlns:[namespace prefix] and
xsi:schemaLocation.