Devsphere.com


com.devsphere.xml.saxdomix.helpers
Interface SDXHelperT

All Known Implementing Classes:
DefaultSDXHelperT

public interface SDXHelperT

SDXBuilderT needs a factory for DOM sub-trees that implements this interface.

See Also:
SDXBuilderT, DefaultSDXHelperT

Method Summary
 org.w3c.dom.Element endBuilding()
          This method must be called after the dispatching of the last SAX event of the sequence that was used for building the current DOM sub-tree.
 org.xml.sax.ContentHandler getContentHandler()
          Returns the SAX ContentHandler that should receive the events between startBuilding() and endBuilding().
 org.xml.sax.ext.LexicalHandler getLexicalHandler()
          Returns the SAX LexicalHandler that should receive the events between startBuilding() and endBuilding().
 void startBuilding()
          Prepares the helper for building a DOM sub-tree from SAX events.
 

Method Detail

startBuilding

public void startBuilding()
                   throws org.xml.sax.SAXException
Prepares the helper for building a DOM sub-tree from SAX events. After calling this method, the user of a class that implements this interface may feed the ContentHandler and LexicalHandler with SAX events. Then, the endBuilding() method must be called in order to obtain the root of the created DOM sub-tree.

Throws:
org.xml.sax.SAXException - If an error must be signaled

endBuilding

public org.w3c.dom.Element endBuilding()
                                throws org.xml.sax.SAXException
This method must be called after the dispatching of the last SAX event of the sequence that was used for building the current DOM sub-tree. The SAX handlers may not receive events until the next call of startBuilding(), which will mark the beginning of the construction of another DOM sub-tree.

Returns:
The root of the created DOM sub-tree
Throws:
org.xml.sax.SAXException - If an error must be signaled

getContentHandler

public org.xml.sax.ContentHandler getContentHandler()
Returns the SAX ContentHandler that should receive the events between startBuilding() and endBuilding().

Returns:
The ContentHandler of this helper

getLexicalHandler

public org.xml.sax.ext.LexicalHandler getLexicalHandler()
Returns the SAX LexicalHandler that should receive the events between startBuilding() and endBuilding().

Returns:
The LexicalHandler of this helper

 Devsphere.com