edu.ucsb.adl.reports
Interface XmlHandler

All Known Implementing Classes:
AccessReportValidator, BrowseReportParser, BrowseReportValidator, BucketReport, BucketReportValidator, DateRanker, Query, SpatialRanker

public interface XmlHandler

The event-handling interface for the high-performance validating XML parser. Start and end events are delivered for each element that appears in the document being processed, unless the element is within an ANY content model. Single-tag empty elements (e.g., <foo/>) are effectively expanded into dual-tag empty elements (e.g., <foo></foo>). The order in which events are delivered reflects the order of information in the document.

Version:
$Header: /export/home/gjanee/utils/reports/edu/ucsb/adl/reports/RCS/XmlHandler.java,v 1.1 2003/03/17 14:26:44 gjanee Exp $

$Log: XmlHandler.java,v $ Revision 1.1 2003/03/17 14:26:44 gjanee Initial revision

Author:
Greg Janée
Alexandria Digital Library

Method Summary
 void characters(char[] string, int start, int length)
          Called to receive (a fragment of) #PCDATA textual content.
 void endElement(int elementCode)
          Called at the end of an element: after the element's end tag, but before subsequent content in the document.
 void startElement(int elementCode, java.lang.String[] attributes)
          Called at the beginning of an element: after the element's start tag and any attributes, but before the element's content.
 

Method Detail

startElement

public void startElement(int elementCode,
                         java.lang.String[] attributes)
                  throws XmlException
Called at the beginning of an element: after the element's start tag and any attributes, but before the element's content.

Parameters:
elementCode - The element's code.
attributes - Element attribute values, indexed by attribute code. All of the element's declared attributes are represented in the array; attributes for which a value is specified in the document or for which there is a DTD-specified default have non-null values. The handler should reference the array for the duration of the call only, as it is reused by the parser. Also, the array may be longer than necessary.
Throws:
XmlException - If any error occurs.

endElement

public void endElement(int elementCode)
                throws XmlException
Called at the end of an element: after the element's end tag, but before subsequent content in the document.

Parameters:
elementCode - The element's code.
Throws:
XmlException - If any error occurs.

characters

public void characters(char[] string,
                       int start,
                       int length)
                throws XmlException
Called to receive (a fragment of) #PCDATA textual content.

Parameters:
string - The textual content.
start - The index in string at which the textual content starts.
length - The length of the content.
Throws:
XmlException - If any error occurs.