Devsphere.com


com.devsphere.xml.saxdomix
Interface SDXOldController


public interface SDXOldController

The application implements this interface in order to control the mixed SAX 1.0 - DOM Level 1 parsing.

The com.devsphere.xml.saxdomix.SDXOldBuilder class of the framework provides the mixed SAX 1.0 - DOM Level 1 parsing functionality.

See Also:
SDXOldBuilder

Method Summary
 void handleDOM(org.w3c.dom.Element element)
          Receives the DOM sub-trees for handling.
 boolean wantDOM(java.lang.String name, org.xml.sax.AttributeList attributes)
          Returns true when the application wants to receive a DOM sub-tree for handling.
 

Method Detail

wantDOM

public boolean wantDOM(java.lang.String name,
                       org.xml.sax.AttributeList attributes)
                throws org.xml.sax.SAXException
Returns true when the application wants to receive a DOM sub-tree for handling.

During the SAX parsing, a builder object invokes the controller's wantDOM() method for each startElement() parsing event. If wantDOM() returns false the SAX parsing mode continues. When wantDOM() returns true the builder enters in DOM parsing mode and starts creating a DOM sub-tree from all SAX events between the current startElement() and the corresponding endElement().

Parameters:
name - The element's name
attributes - The element's attributes
Returns:
A boolean value indicating whether the builder must enter in DOM parsing mode or must remain in SAX parsing mode
Throws:
org.xml.sax.SAXException - If an error must be signaled

handleDOM

public void handleDOM(org.w3c.dom.Element element)
               throws org.xml.sax.SAXException
Receives the DOM sub-trees for handling.

After wantDOM() returns true, the builder constructs a DOM sub-tree from SAX events and passes it to the controller's handleDOM() method. After handling, the builder returns to the SAX parsing mode.

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

 Devsphere.com