org.clazzes.util.xml
Interface SAXTagHandler


public interface SAXTagHandler

An interface, which allows to implement SAX parsers as a stack of tag handlers.

Author:
wglas

Method Summary
 void closeTag(java.lang.String uri, java.lang.String localName, java.lang.String name)
          This function is called, when the tag is closed.
 void processCharacters(char[] ch, int start, int length)
          This function is called, when character data inside the processed tag is received through ContentHandler.characters(char[], int, int).
 SAXTagHandler startChildElement(java.lang.String uri, java.lang.String localName, java.lang.String name, org.xml.sax.Attributes atts)
          This function is called, when a child element is opened inside the processed tag through ContentHandler.startElement(String, String, String, Attributes).
 

Method Detail

processCharacters

void processCharacters(char[] ch,
                       int start,
                       int length)
                       throws org.xml.sax.SAXException
This function is called, when character data inside the processed tag is received through ContentHandler.characters(char[], int, int).

Parameters:
ch - The character array.
start - The start index inside the character array of the received data.
length - The length of the received data.
Throws:
org.xml.sax.SAXException - Upon errors processing the data.

startChildElement

SAXTagHandler startChildElement(java.lang.String uri,
                                java.lang.String localName,
                                java.lang.String name,
                                org.xml.sax.Attributes atts)
                                throws org.xml.sax.SAXException
This function is called, when a child element is opened inside the processed tag through ContentHandler.startElement(String, String, String, Attributes).

Parameters:
uri - The namespace URI of the received tag.
localName - The name of the tag without any namespace prefix.
name - The fully-qualified name of the tag. This is the tag name, if the namespace URI is null.
atts - Any attributes attached to the child
Returns:
The handler, which processes the child. A null return value tells the SAX parser to ignore the content of the child.
Throws:
org.xml.sax.SAXException - Upon errors processing the data.

closeTag

void closeTag(java.lang.String uri,
              java.lang.String localName,
              java.lang.String name)
              throws org.xml.sax.SAXException
This function is called, when the tag is closed.

Parameters:
uri - The namespace URI of the tag.
localName - The name of the tag without any namespace prefix.
name - The fully-qualified name of the tag. This is the tag name, if the namespace URI is null.
Throws:
org.xml.sax.SAXException - Upon errors processing the data.


Copyright © 2009. All Rights Reserved.