All Packages Class Hierarchy This Package Previous Next Index
Interface w3c.xmlOnline.parser.XMLListener
- public interface interface XMLListener
An interface that describes the methods an object
must implement when it wants to capture the parser
events generated by the XML parser.
- Version:
- $Id: w3c.xmlOnline.parser.XMLListener.html,v 1.7 1997/06/09 22:25:20 bbos Exp $
- Author:
- Bert Bos
- See Also:
- Parser
-
handleAttribute(String, String)
- This function is called by the parser when it has
recognized an attribute name.
-
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(String)
- 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 or the end of an empty tag.
-
handlePI(String)
- This function is called by the parser when it has
recognized a processing instruction.
-
handleStartDoc(String, String)
- This function is called by the parser when it has
recognized a doctype declaration.
-
handleStartTag(String)
- This function is called by the parser when it has
recognized a start tag.
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)
- This function is called by the parser when it has
recognized a start tag.
- Parameters:
- tag - the tag name in lowercase
handleAttribute
public abstract void handleAttribute(String attribute,
String value)
- This function is called by the parser when it has
recognized an attribute name. The attribute
belongs to the tag that was handled by the most recent
call to handleStartTag().
Note that there is no indication of whether this
attribute was actually on the tag, or whether it
is the declared default value for the attribute on
this tag (<?XML DEFAULT...?>)
- Parameters:
- attribute - the name of the attribute in lowercase
- value - the value of the attribute (a string)
handleEndTag
public abstract void handleEndTag(String tag)
- This function is called by the parser when it has
recognized an end tag or the end of an empty 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 doctype)
- This function is called by the parser when it has
recognized a doctype declaration.
- Parameters:
- root - the name of the start tag
- doctype - the URL defining the document type (may be null)
handleEndDoc
public abstract void handleEndDoc(String root)
- 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
All Packages Class Hierarchy This Package Previous Next Index