org.springframework.xml.stream
Class AbstractStaxContentHandler
java.lang.Object
org.springframework.xml.stream.AbstractStaxContentHandler
- All Implemented Interfaces:
- ContentHandler
- Direct Known Subclasses:
- StaxEventContentHandler, StaxStreamContentHandler
public abstract class AbstractStaxContentHandler
- extends Object
- implements ContentHandler
Abstract base class for SAX ContentHandler
implementations that use StAX as a basis. All methods
delegate to internal template methods, capable of throwing a XMLStreamException
. Additionally, an
namespace context is used to keep track of declared namespaces.
- Since:
- 1.0.0
- Author:
- Arjen Poutsma
Method Summary |
void |
characters(char[] ch,
int start,
int length)
|
protected abstract void |
charactersInternal(char[] ch,
int start,
int length)
|
void |
endDocument()
|
protected abstract void |
endDocumentInternal()
|
void |
endElement(String uri,
String localName,
String qName)
|
protected abstract void |
endElementInternal(QName name,
SimpleNamespaceContext namespaceContext)
|
void |
endPrefixMapping(String prefix)
Removes the binding for the given prefix. |
void |
ignorableWhitespace(char[] ch,
int start,
int length)
|
protected abstract void |
ignorableWhitespaceInternal(char[] ch,
int start,
int length)
|
void |
processingInstruction(String target,
String data)
|
protected abstract void |
processingInstructionInternal(String target,
String data)
|
void |
skippedEntity(String name)
|
protected abstract void |
skippedEntityInternal(String name)
|
void |
startDocument()
|
protected abstract void |
startDocumentInternal()
|
void |
startElement(String uri,
String localName,
String qName,
Attributes atts)
|
protected abstract void |
startElementInternal(QName name,
Attributes atts,
SimpleNamespaceContext namespaceContext)
|
void |
startPrefixMapping(String prefix,
String uri)
Binds the given prefix to the given namespaces. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractStaxContentHandler
public AbstractStaxContentHandler()
startDocument
public final void startDocument()
throws SAXException
- Specified by:
startDocument
in interface ContentHandler
- Throws:
SAXException
startDocumentInternal
protected abstract void startDocumentInternal()
throws XMLStreamException
- Throws:
XMLStreamException
endDocument
public final void endDocument()
throws SAXException
- Specified by:
endDocument
in interface ContentHandler
- Throws:
SAXException
endDocumentInternal
protected abstract void endDocumentInternal()
throws XMLStreamException
- Throws:
XMLStreamException
startPrefixMapping
public final void startPrefixMapping(String prefix,
String uri)
- Binds the given prefix to the given namespaces.
- Specified by:
startPrefixMapping
in interface ContentHandler
- See Also:
SimpleNamespaceContext.bindNamespaceUri(String,String)
endPrefixMapping
public final void endPrefixMapping(String prefix)
- Removes the binding for the given prefix.
- Specified by:
endPrefixMapping
in interface ContentHandler
- See Also:
SimpleNamespaceContext.removeBinding(String)
startElement
public final void startElement(String uri,
String localName,
String qName,
Attributes atts)
throws SAXException
- Specified by:
startElement
in interface ContentHandler
- Throws:
SAXException
startElementInternal
protected abstract void startElementInternal(QName name,
Attributes atts,
SimpleNamespaceContext namespaceContext)
throws XMLStreamException
- Throws:
XMLStreamException
endElement
public final void endElement(String uri,
String localName,
String qName)
throws SAXException
- Specified by:
endElement
in interface ContentHandler
- Throws:
SAXException
endElementInternal
protected abstract void endElementInternal(QName name,
SimpleNamespaceContext namespaceContext)
throws XMLStreamException
- Throws:
XMLStreamException
characters
public final void characters(char[] ch,
int start,
int length)
throws SAXException
- Specified by:
characters
in interface ContentHandler
- Throws:
SAXException
charactersInternal
protected abstract void charactersInternal(char[] ch,
int start,
int length)
throws XMLStreamException
- Throws:
XMLStreamException
ignorableWhitespace
public final void ignorableWhitespace(char[] ch,
int start,
int length)
throws SAXException
- Specified by:
ignorableWhitespace
in interface ContentHandler
- Throws:
SAXException
ignorableWhitespaceInternal
protected abstract void ignorableWhitespaceInternal(char[] ch,
int start,
int length)
throws XMLStreamException
- Throws:
XMLStreamException
processingInstruction
public final void processingInstruction(String target,
String data)
throws SAXException
- Specified by:
processingInstruction
in interface ContentHandler
- Throws:
SAXException
processingInstructionInternal
protected abstract void processingInstructionInternal(String target,
String data)
throws XMLStreamException
- Throws:
XMLStreamException
skippedEntity
public final void skippedEntity(String name)
throws SAXException
- Specified by:
skippedEntity
in interface ContentHandler
- Throws:
SAXException
skippedEntityInternal
protected abstract void skippedEntityInternal(String name)
throws XMLStreamException
- Throws:
XMLStreamException
Copyright © 2005-2010 The Spring Web Services Framework. All Rights Reserved.