Listing 3. SAXTagHandler Interface /** * This interface represents a callback for XML element begin and end * events during SAX parsing of an XML document. * It is a simplified version of the ContentHandler interface. * * @author Mark Priest */ public interface SAXTagHandler { /** * Called by the SAXAdapter when a start tag, for which this * callback interface has been registered, has been encountered. * @param argTagNamespace namespace URI of tag * @param argLocalTagName unqualified tag name * @param argQName qualified name of tag * @param argAttributes tag attributes * @param argText a StringBuffer that contains the text between the start * and end tags. * @param argContext the Map that represents parsing context. * This context must be understood by each handler * @param argNamespaceContext an interface that allows the handler to access * namespace data associated with the current parsing state * @throws org.xml.sax.SAXException */ public void onStartTag(String argTagNamespace, String argLocalTagName, String argQName, Attributes argAttributes, StringBuffer argText, Map argContext, NamespaceContext argNamespaceContext) throws SAXException; /** * Called by the SAXAdapter when an end tag, for which this * callback interface has been registered, has been encountered. * @param argTagNamespace namespace URI of tag * @param argLocalTagName unqualified tag name * @param argQName qualified tag name * @param argContext the Map that represents parsing context. This context * must be understood by each handler * @param argNamespaceContext an interface that allows the handler to access * namespace data associated with the current parsing state * @throws org.xml.sax.SAXException */ public void onEndTag(String argTagNamespace, String argLocalTagName, String argQName, Map argContext, NamespaceContext argNamespaceContext) throws SAXException; }