public abstract class NamespaceAwareNestedTagHandler extends SAXNestedTagHandler
Modifier and Type | Field and Description |
---|---|
protected boolean |
allowAllNamespaces |
protected String |
targetNamespace |
loaderContext, locator, parentHandler
Constructor and Description |
---|
NamespaceAwareNestedTagHandler(LoaderContext loaderContext) |
NamespaceAwareNestedTagHandler(NamespaceAwareNestedTagHandler parentHandler) |
NamespaceAwareNestedTagHandler(SAXNestedTagHandler parentHandler,
String targetNamespace) |
Modifier and Type | Method and Description |
---|---|
void |
characters(char[] ch,
int start,
int length) |
protected ContentHandler |
createChildTagHandler(String namespaceURI,
String localName,
String qName,
Attributes attributes)
This method should be used to create nested handlers to process children elements.
|
void |
endElement(String namespaceURI,
String localName,
String qName) |
protected void |
processCharData(String localName,
String data) |
protected abstract boolean |
processElement(String namespaceURI,
String localName,
Attributes attributes)
Main method to process XML content.
|
void |
setAllowAllNamespaces(boolean allowAllNamespaces) |
void |
setTargetNamespace(String targetNamespace) |
void |
startElement(String namespaceURI,
String localName,
String qName,
Attributes attributes)
This method directly called by SAX parser, do not override it directly,
use
SAXNestedTagHandler.processElement(String, String, Attributes) method instead to process content. |
beforeScopeEnd, getParentHandler, setDocumentLocator, stop, unexpectedTagMessage
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
protected String targetNamespace
protected boolean allowAllNamespaces
public NamespaceAwareNestedTagHandler(LoaderContext loaderContext)
public NamespaceAwareNestedTagHandler(SAXNestedTagHandler parentHandler, String targetNamespace)
public NamespaceAwareNestedTagHandler(NamespaceAwareNestedTagHandler parentHandler)
protected abstract boolean processElement(String namespaceURI, String localName, Attributes attributes) throws SAXException
SAXNestedTagHandler
processElement
in class SAXNestedTagHandler
namespaceURI
- namespace for taglocalName
- tag local name (i.e. w/o namespace prefix)attributes
- tag attributesSAXException
- can be thrown to abort parsingSAXNestedTagHandler.createChildTagHandler(String, String, String, Attributes)
public void characters(char[] ch, int start, int length) throws SAXException
characters
in interface ContentHandler
characters
in class DefaultHandler
SAXException
public final void startElement(String namespaceURI, String localName, String qName, Attributes attributes) throws SAXException
SAXNestedTagHandler
SAXNestedTagHandler.processElement(String, String, Attributes)
method instead to process content.startElement
in interface ContentHandler
startElement
in class SAXNestedTagHandler
SAXException
SAXNestedTagHandler.createChildTagHandler(String, String, String, Attributes)
public void endElement(String namespaceURI, String localName, String qName) throws SAXException
endElement
in interface ContentHandler
endElement
in class SAXNestedTagHandler
SAXException
protected ContentHandler createChildTagHandler(String namespaceURI, String localName, String qName, Attributes attributes)
SAXNestedTagHandler
null
.createChildTagHandler
in class SAXNestedTagHandler
namespaceURI
- namespace for taglocalName
- tag local name (i.e. w/o namespace prefix)qName
- tag full name (i.e. with namespace prefix)attributes
- tag attributespublic void setTargetNamespace(String targetNamespace)
public void setAllowAllNamespaces(boolean allowAllNamespaces)
Copyright © 2001–2017 Apache Cayenne. All rights reserved.