Package org.apache.guacamole.xml
Class DocumentHandler
- java.lang.Object
-
- org.xml.sax.helpers.DefaultHandler
-
- org.apache.guacamole.xml.DocumentHandler
-
- All Implemented Interfaces:
ContentHandler,DTDHandler,EntityResolver,ErrorHandler
public class DocumentHandler extends 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.
-
-
Constructor Summary
Constructors Constructor Description DocumentHandler(String rootElementName, TagHandler root)Creates a new DocumentHandler which will use the given TagHandler to handle the root element.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcharacters(char[] ch, int start, int length)voidendElement(String uri, String localName, String qName)voidstartElement(String uri, String localName, String qName, Attributes attributes)-
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
-
-
-
-
Constructor Detail
-
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.
-
-
Method Detail
-
startElement
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException
- Specified by:
startElementin interfaceContentHandler- Overrides:
startElementin classDefaultHandler- Throws:
SAXException
-
endElement
public void endElement(String uri, String localName, String qName) throws SAXException
- Specified by:
endElementin interfaceContentHandler- Overrides:
endElementin classDefaultHandler- Throws:
SAXException
-
characters
public void characters(char[] ch, int start, int length) throws SAXException- Specified by:
charactersin interfaceContentHandler- Overrides:
charactersin classDefaultHandler- Throws:
SAXException
-
-