All Packages Class Hierarchy This Package Previous Next Index

Interface org.jfouffa.parser.html.DocumentListener

public interface DocumentListener
An interface that describes the methods an object must implement when it wants to capture the parser events generated by the XML parser.


Method index

 o handleComment(String)
This function is called by the parser when it has recognized a comment.
 o handleData(String)
This function is called by the parser when it has recognized character data.
 o handleEndDoc()
This function is called by the parser when it has recognized the end of a document or sub-document.
 o handleEndTag(String)
This function is called by the parser when it has recognized an end tag
 o handleGeneralEntity(String)
This function is called by the parser when it has recognized a general entity.
 o handlePI(String)
This function is called by the parser when it has recognized a processing instruction.
 o handleStartDoc(String, String, String)
This function is called by the parser when it has recognized a doctype declaration.
 o handleStartTag(String, AttributeList)
This function is called by the parser when it has recognized a start tag.

Methods

 o handleComment
 public abstract void handleComment(String comment)
This function is called by the parser when it has recognized a comment.

Parameters:
comment - the comment string (without <!-- -->)
 o handleStartTag
 public abstract void handleStartTag(String tag,
                                     AttributeList attrs)
This function is called by the parser when it has recognized a start tag.

Parameters:
tag - the tag name
attrs - all attributes
See Also:
Attribute
 o handleEndTag
 public abstract void handleEndTag(String tag)
This function is called by the parser when it has recognized an end tag

Parameters:
tag - the name of the tag in lowercase
 o handleData
 public abstract void handleData(String data)
This function is called by the parser when it has recognized character data. The function may be called several times without intervening calls to handleStartTag() or handleEndTag(). The content of an element is thus the concatenation of all consecutive calls to handleData().

Parameters:
data - the character data
 o handlePI
 public abstract void handlePI(String pi)
This function is called by the parser when it has recognized a processing instruction.

Parameters:
pi - the processing instruction (without <? ?>)
 o handleStartDoc
 public abstract void handleStartDoc(String root,
                                     String publicID,
                                     String systemID)
This function is called by the parser when it has recognized a doctype declaration.

Be careful, this method can change in futur version

Parameters:
root - the name of the start tag
publicID - the public identifier for the DTD
systemID - the system identifier for the DTD
 o handleEndDoc
 public abstract void handleEndDoc()
This function is called by the parser when it has recognized the end of a document or sub-document.

Parameters:
root - the name of the start tag
 o handleGeneralEntity
 public abstract String handleGeneralEntity(String name)
This function is called by the parser when it has recognized a general entity.

Parameters:
name - the name of the general entity in uppercase
Returns:
value The value of the entity