public class ElementMappingContentHandler extends ContentHandlerDecorator
QName
s 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, toString
error, fatalError, notationDecl, resolveEntity, unparsedEntityDecl, warning
public ElementMappingContentHandler(ContentHandler handler, Map<QName,ElementMappingContentHandler.TargetElement> mappings)
public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException
startElement
in interface ContentHandler
startElement
in class ContentHandlerDecorator
SAXException
public void endElement(String namespaceURI, String localName, String qName) throws SAXException
endElement
in interface ContentHandler
endElement
in class ContentHandlerDecorator
SAXException
Copyright © 2007-2015 The Apache Software Foundation. All Rights Reserved.