Arch4J 1.1

org.arch4j.xml
Interface XMLHandler

All Known Implementing Classes:
XMLHandlerAdapter, XMLPropertyBuilder, XMLStreamTest

public interface XMLHandler

Interface implemented by objects which listen to the events of an XML document stream. Front end for functionality of SAX parser HandlerBase interface.

Version:
2.0
Author:
Russ Brown, Ross E. Greinke

Method Summary
 void characters(char[] buffer, int start, int length)
          this method is called when the parser encounters plain text outside of a bracketed tag.
 void endDocument()
          called when parser reaches the end of the document
 void endElement(String name)
          this method is called whenever the parser encounters the end of an element
 void error(String message, String source, int line, int column)
          this method is called by the parser if it encounters a recoverable error.
 void fatalError(String message, String source, int line, int column)
          this method is called by the parser if it encounters a non-recoverable error.
 void startDocument()
          this method is called by the parser at the start of a document
 void startElement(String name, Map attributes)
          this method is called when the parser encounters a starting element tag.
 void warning(String message, String source, int line, int column)
          this method is called by the parser if it encounters a warning situation.
 

Method Detail

startDocument

public void startDocument()
this method is called by the parser at the start of a document


characters

public void characters(char[] buffer,
                       int start,
                       int length)
this method is called when the parser encounters plain text outside of a bracketed tag. It provides the text in the buffer in the index range start -> end.

Parameters:
buffer - buffer containing plain text characters
start - start index of plain text characters in buffer
length - number of characters in plain text

startElement

public void startElement(String name,
                         Map attributes)
this method is called when the parser encounters a starting element tag.

Parameters:
attributes - a map of attribute names and values found in this element

endElement

public void endElement(String name)
this method is called whenever the parser encounters the end of an element

Parameters:
name - the tag of the element that is ending

endDocument

public void endDocument()
called when parser reaches the end of the document


error

public void error(String message,
                  String source,
                  int line,
                  int column)
this method is called by the parser if it encounters a recoverable error.

Parameters:
message - error message generated by parser
source - source of XML document - generally a file name
line - line number of document on which error occurred.
column - column number at which error occurred.

fatalError

public void fatalError(String message,
                       String source,
                       int line,
                       int column)
this method is called by the parser if it encounters a non-recoverable error. The parser aborts after this callback.

Parameters:
message - error message generated by parser
source - source of XML document - generally a file name
line - line number of document on which error occurred.
column - column number at which error occurred.

warning

public void warning(String message,
                    String source,
                    int line,
                    int column)
this method is called by the parser if it encounters a warning situation.

Parameters:
message - error message generated by parser
source - source of XML document - generally a file name
line - line number of document on which error occurred.
column - column number at which error occurred.

Arch4J 1.1

Copyright © 2000-2004 SpiderLogic, a service of Wipfli Ullrich Bertelson LLP.