public class DelegateHandler extends SimpleElementHandler
DelegateHandler may be used with a delegating
handler to more efficiently implement nested embeddings. A
delegate handler contains a pointer back to its delegating handler
in order to coordinate further delegation from the delegate
handler.CDATA_ATTS_TYPE, EMPTY_ATTS, NO_OP_DEFAULT_HANDLER| Constructor and Description |
|---|
DelegateHandler(DelegatingHandler handler)
Construct a delegate handler that coordinates recursive
delegation with the specified delegating handler.
|
| Modifier and Type | Method and Description |
|---|---|
void |
finishDelegate(String qName,
org.xml.sax.helpers.DefaultHandler handler)
This method is called when this handler has finished delegating
the specified element to the specified handler.
|
void |
setDelegate(String qName,
org.xml.sax.helpers.DefaultHandler handler)
Calling this method causes subsequent events embedded within
the specified element to be delegated to the specified handler.
|
void |
startElement(String namespaceURI,
String localName,
String qName,
Attributes atts)
Starts the specified element with the specified attributes.
|
addSimpleAttribute, characters, characters, characters, characters, createAttributes, createAttributes, createAttributes, createAttributes, createAttributes, createAttributes, endSimpleElement, endSimpleElement, startEndSimpleElement, startEndSimpleElement, startSimpleElement, startSimpleElement, startSimpleElement, startSimpleElement, startSimpleElement, startSimpleElement, startSimpleElementcharacters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warningpublic DelegateHandler(DelegatingHandler handler)
public void setDelegate(String qName, org.xml.sax.helpers.DefaultHandler handler)
qName - Qualified name of element.handler - Handler to accept delegated events.IllegalArgumentException - If the handler is a delegate
handler that is tied to a different delegating handler.public void finishDelegate(String qName, org.xml.sax.helpers.DefaultHandler handler)
qName - Qualified name of element.handler - Name of handler that handled the delegated
events.public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException
super construct.startElement in interface ContentHandlerstartElement in class org.xml.sax.helpers.DefaultHandlernamespaceURI - The URI identifying the name space, or
null if there isn't one.localName - Local name of element.qName - Qualified name of element, which is prefixed with
the name space URI and a colon if it is non-null, and is equal
to local name if there is no name space specified.atts - Attributes for this element.SAXException - if the contained hanlder throws a SAX
exception.Copyright © 2019 Alias-i, Inc.. All rights reserved.