
Cheapest cheapest = new Cheapest();
// ...
parser.setDocumentHandler(cheapest);
DocumentHandler declares events related to the document. The following
events are available:
• startDocument()/endDocument() notify the application of the docu-
ment’s beginning or ending.
•
startElement()/endElement() notify the application that an element
starts or ends (which corresponds to the opening and closing tags
of the element). Attributes are passed as an AttributeList; see
the section “AttributeList” that follows. Empty elements (<img
href=”logo.gif”/>) generate both startElement and endElement
events even though there is only one tag.
• characters()/ignorableWhitespace() ...