erland.util
Interface XMLParserHandlerInterface

All Known Implementing Classes:
SimpleXMLParserHandler

public interface XMLParserHandlerInterface

Defines the methods that an XML parser handler needs to implement to be able to parse an XML document using an XML parser implementing XMLParserInterface

Author:
Erland Isaksson

Method Summary
 void characters(String chars, int start, int length)
          Called one or several times for each values of a node in the XML document.
 void endDocument()
          Called in the end of the document when parsing has finished
 void endElement(String name)
          Called once at the end of each node in the XML document.
 void startDocument()
          Called in the beginning of the document before parsing starts
 void startElement(String name, Map attributes)
          Called once at the start of each node in the XML document.
 

Method Detail

startDocument

void startDocument()
Called in the beginning of the document before parsing starts


endDocument

void endDocument()
Called in the end of the document when parsing has finished


startElement

void startElement(String name,
                  Map attributes)
Called once at the start of each node in the XML document. The value of the node is sent in characters(String,int,int)

Parameters:
name - The name of the node
attributes - The attributes of the node

endElement

void endElement(String name)
Called once at the end of each node in the XML document.

Parameters:
name - The name of the node

characters

void characters(String chars,
                int start,
                int length)
Called one or several times for each values of a node in the XML document. Observe that the whole document may be sent int the chars parameter, the position of the value in the string is specified with the start and length parameters.

Parameters:
chars - The String object containing the value
start - The start position of the value
length - The length of the value


Copyright © 2003-2005 Erland Isaksson. All Rights Reserved.