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