| java.lang.Object com.microstar.xml.HandlerBase
HandlerBase | public class HandlerBase implements XmlHandler(Code) | | Convenience base class for AElfred handlers.
This base class implements the XmlHandler interface with
(mostly empty) default handlers. You are not required to use this,
but if you need to handle only a few events, you might find
it convenient to extend this class rather than implementing
the entire interface. This example overrides only the
charData method, using the defaults for the others:
import com.microstar.xml.HandlerBase;
public class MyHandler extends HandlerBase {
public void charData (char ch[], int start, int length)
{
System.out.println("Data: " + new String (ch, start, length));
}
}
This class is optional, but if you use it, you must also
include the XmlException class.
Do not extend this if you are using SAX; extend
org.xml.sax.HandlerBase instead.
author: Copyright (c) 1998 by Microstar Software Ltd. author: written by David Megginson <dmeggins@microstar.com> version: 1.1 See Also: XmlHandler See Also: XmlException See Also: org.xml.sax.HandlerBase |
Method Summary | |
public void | attribute(String aname, String value, boolean isSpecified) Handle an attribute assignment. | public void | charData(char ch, int start, int length) Handle character data. | public void | doctypeDecl(String name, String publicId, String systemId) Handle a document type declaration. | public void | endDocument() Handle the end of the document. | public void | endElement(String elname) Handle the end of an element. | public void | endExternalEntity(String systemId) Handle the end of an external entity. | public void | error(String message, String systemId, int line, int column) Throw an exception for a fatal error. | public void | ignorableWhitespace(char ch, int start, int length) Handle ignorable whitespace. | public void | processingInstruction(String target, String data) Handle a processing instruction. | public Object | resolveEntity(String publicId, String systemId) Resolve an external entity. | public void | startDocument() Handle the start of the document. | public void | startElement(String elname) Handle the start of an element. | public void | startExternalEntity(String systemId) Handle the start of an external entity. |
|
|