public class ElementMappingContentHandler extends ContentHandlerDecorator
QNames using
a Map. Not mappable elements are not forwarded.
Attributes may also be mapped (for each element different using
a Map for attributes), not mappable attributes are not
forwarded. The default is to not map any attributes and therefore do
not forward any of them.| Modifier and Type | Class and Description |
|---|---|
static class |
ElementMappingContentHandler.TargetElement |
| Constructor and Description |
|---|
ElementMappingContentHandler(ContentHandler handler,
Map<QName,ElementMappingContentHandler.TargetElement> mappings) |
| Modifier and Type | Method and Description |
|---|---|
void |
endElement(String namespaceURI,
String localName,
String qName) |
protected static String |
getQNameAsString(QName qname) |
void |
startElement(String namespaceURI,
String localName,
String qName,
Attributes atts) |
characters, endDocument, endPrefixMapping, handleException, ignorableWhitespace, processingInstruction, setContentHandler, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, toStringerror, fatalError, notationDecl, resolveEntity, unparsedEntityDecl, warningpublic ElementMappingContentHandler(ContentHandler handler, Map<QName,ElementMappingContentHandler.TargetElement> mappings)
public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException
startElement in interface ContentHandlerstartElement in class ContentHandlerDecoratorSAXExceptionpublic void endElement(String namespaceURI, String localName, String qName) throws SAXException
endElement in interface ContentHandlerendElement in class ContentHandlerDecoratorSAXExceptionCopyright © 2007–2021 The Apache Software Foundation. All rights reserved.