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

Method Index

 o handleAttribute(String, String)
This function is called by the parser when it has recognized an attribute name.
 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(String)
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 or the end of an empty tag.
 o handlePI(String)
This function is called by the parser when it has recognized a processing instruction.
 o handleStartDoc(String, String)
This function is called by the parser when it has recognized a doctype declaration.
 o handleStartTag(String)
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)
This function is called by the parser when it has recognized a start tag.

Parameters:
tag - the tag name in lowercase
 o 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)
 o 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
 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 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)
 o 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