java.lang.Object
org.xbib.content.xml.stream.StaxStreamContentHandler
- All Implemented Interfaces:
ContentHandler
SAX
ContentHandler that writes to a XMLStreamWriter.-
Constructor Summary
ConstructorsConstructorDescriptionStaxStreamContentHandler(XMLStreamWriter streamWriter) Constructs a new instance of theStaxStreamContentHandlerthat writes to the givenXMLStreamWriter. -
Method Summary
Modifier and TypeMethodDescriptionfinal voidcharacters(char[] ch, int start, int length) protected voidcharactersInternal(char[] ch, int start, int length) final voidprotected voidfinal voidendElement(String uri, String localName, String qName) protected voidendElementInternal(QName name, SimpleNamespaceContext namespaceContext) final voidendPrefixMapping(String prefix) Removes the binding for the given prefix.final voidignorableWhitespace(char[] ch, int start, int length) protected voidignorableWhitespaceInternal(char[] ch, int start, int length) final voidprocessingInstruction(String target, String data) protected voidprocessingInstructionInternal(String target, String data) voidsetDocumentLocator(Locator locator) final voidskippedEntity(String name) protected voidskippedEntityInternal(String name) final voidprotected voidfinal voidstartElement(String uri, String localName, String qName, Attributes atts) protected voidstartElementInternal(QName name, Attributes attributes, SimpleNamespaceContext namespaceContext) final voidstartPrefixMapping(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, waitMethods inherited from interface org.xml.sax.ContentHandler
declaration
-
Constructor Details
-
StaxStreamContentHandler
Constructs a new instance of theStaxStreamContentHandlerthat writes to the givenXMLStreamWriter.- Parameters:
streamWriter- the stream writer to write to
-
-
Method Details
-
setDocumentLocator
-
charactersInternal
- Throws:
XMLStreamException
-
endDocumentInternal
- Throws:
XMLStreamException
-
endElementInternal
protected void endElementInternal(QName name, SimpleNamespaceContext namespaceContext) throws XMLStreamException - Throws:
XMLStreamException
-
ignorableWhitespaceInternal
protected void ignorableWhitespaceInternal(char[] ch, int start, int length) throws XMLStreamException - Throws:
XMLStreamException
-
processingInstructionInternal
- Throws:
XMLStreamException
-
skippedEntityInternal
-
startDocumentInternal
- Throws:
XMLStreamException
-
startElementInternal
protected void startElementInternal(QName name, Attributes attributes, SimpleNamespaceContext namespaceContext) throws XMLStreamException - Throws:
XMLStreamException
-
startDocument
- Specified by:
startDocumentin interfaceContentHandler- Throws:
SAXException
-
endDocument
- Specified by:
endDocumentin interfaceContentHandler- Throws:
SAXException
-
startPrefixMapping
Binds the given prefix to the given namespaces.- Specified by:
startPrefixMappingin interfaceContentHandler- See Also:
-
endPrefixMapping
Removes the binding for the given prefix.- Specified by:
endPrefixMappingin interfaceContentHandler- See Also:
-
startElement
public final void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException - Specified by:
startElementin interfaceContentHandler- Throws:
SAXException
-
endElement
- Specified by:
endElementin interfaceContentHandler- Throws:
SAXException
-
characters
- Specified by:
charactersin interfaceContentHandler- Throws:
SAXException
-
ignorableWhitespace
- Specified by:
ignorableWhitespacein interfaceContentHandler- Throws:
SAXException
-
processingInstruction
- Specified by:
processingInstructionin interfaceContentHandler- Throws:
SAXException
-
skippedEntity
- Specified by:
skippedEntityin interfaceContentHandler- Throws:
SAXException
-