net.sourceforge.guacamole.net.basic.xml
Class DocumentHandler
java.lang.Object
org.xml.sax.helpers.DefaultHandler
net.sourceforge.guacamole.net.basic.xml.DocumentHandler
- All Implemented Interfaces:
- ContentHandler, DTDHandler, EntityResolver, ErrorHandler
public class DocumentHandler
- extends org.xml.sax.helpers.DefaultHandler
A simple ContentHandler implementation which digests SAX document events and
produces simpler tag-level events, maintaining its own stack for the
convenience of the tag handlers.
- Author:
- Mike Jumper
Constructor Summary |
DocumentHandler(String rootElementName,
TagHandler root)
Creates a new DocumentHandler which will use the given TagHandler
to handle the root element. |
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DocumentHandler
public DocumentHandler(String rootElementName,
TagHandler root)
- Creates a new DocumentHandler which will use the given TagHandler
to handle the root element.
- Parameters:
rootElementName
- The name of the root element of the document
being handled.root
- The TagHandler to use for the root element.
startElement
public void startElement(String uri,
String localName,
String qName,
Attributes attributes)
throws SAXException
- Specified by:
startElement
in interface ContentHandler
- Overrides:
startElement
in class org.xml.sax.helpers.DefaultHandler
- Throws:
SAXException
endElement
public void endElement(String uri,
String localName,
String qName)
throws SAXException
- Specified by:
endElement
in interface ContentHandler
- Overrides:
endElement
in class org.xml.sax.helpers.DefaultHandler
- Throws:
SAXException
characters
public void characters(char[] ch,
int start,
int length)
throws SAXException
- Specified by:
characters
in interface ContentHandler
- Overrides:
characters
in class org.xml.sax.helpers.DefaultHandler
- Throws:
SAXException
Copyright © 2013. All Rights Reserved.