- java.lang.Object
-
- org.xbib.content.xml.stream.StaxStreamContentHandler
-
- All Implemented Interfaces:
org.xml.sax.ContentHandler
public class StaxStreamContentHandler extends java.lang.ObjectSAXContentHandlerthat writes to aXMLStreamWriter.
-
-
Constructor Summary
Constructors Constructor Description StaxStreamContentHandler(javax.xml.stream.XMLStreamWriter streamWriter)Constructs a new instance of theStaxStreamContentHandlerthat writes to the givenXMLStreamWriter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcharacters(char[] ch, int start, int length)protected voidcharactersInternal(char[] ch, int start, int length)voidendDocument()protected voidendDocumentInternal()voidendElement(java.lang.String uri, java.lang.String localName, java.lang.String qName)protected voidendElementInternal(javax.xml.namespace.QName name, SimpleNamespaceContext namespaceContext)voidendPrefixMapping(java.lang.String prefix)Removes the binding for the given prefix.voidignorableWhitespace(char[] ch, int start, int length)protected voidignorableWhitespaceInternal(char[] ch, int start, int length)voidprocessingInstruction(java.lang.String target, java.lang.String data)protected voidprocessingInstructionInternal(java.lang.String target, java.lang.String data)voidsetDocumentLocator(org.xml.sax.Locator locator)voidskippedEntity(java.lang.String name)protected voidskippedEntityInternal(java.lang.String name)voidstartDocument()protected voidstartDocumentInternal()voidstartElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts)protected voidstartElementInternal(javax.xml.namespace.QName name, org.xml.sax.Attributes attributes, SimpleNamespaceContext namespaceContext)voidstartPrefixMapping(java.lang.String prefix, java.lang.String uri)Binds the given prefix to the given namespaces.
-
-
-
Method Detail
-
setDocumentLocator
public void setDocumentLocator(org.xml.sax.Locator locator)
-
charactersInternal
protected void charactersInternal(char[] ch, int start, int length) throws javax.xml.stream.XMLStreamException- Throws:
javax.xml.stream.XMLStreamException
-
endDocumentInternal
protected void endDocumentInternal() throws javax.xml.stream.XMLStreamException- Throws:
javax.xml.stream.XMLStreamException
-
endElementInternal
protected void endElementInternal(javax.xml.namespace.QName name, SimpleNamespaceContext namespaceContext) throws javax.xml.stream.XMLStreamException- Throws:
javax.xml.stream.XMLStreamException
-
ignorableWhitespaceInternal
protected void ignorableWhitespaceInternal(char[] ch, int start, int length) throws javax.xml.stream.XMLStreamException- Throws:
javax.xml.stream.XMLStreamException
-
processingInstructionInternal
protected void processingInstructionInternal(java.lang.String target, java.lang.String data) throws javax.xml.stream.XMLStreamException- Throws:
javax.xml.stream.XMLStreamException
-
skippedEntityInternal
protected void skippedEntityInternal(java.lang.String name)
-
startDocumentInternal
protected void startDocumentInternal() throws javax.xml.stream.XMLStreamException- Throws:
javax.xml.stream.XMLStreamException
-
startElementInternal
protected void startElementInternal(javax.xml.namespace.QName name, org.xml.sax.Attributes attributes, SimpleNamespaceContext namespaceContext) throws javax.xml.stream.XMLStreamException- Throws:
javax.xml.stream.XMLStreamException
-
startDocument
public final void startDocument() throws org.xml.sax.SAXException- Specified by:
startDocumentin interfaceorg.xml.sax.ContentHandler- Throws:
org.xml.sax.SAXException
-
endDocument
public final void endDocument() throws org.xml.sax.SAXException- Specified by:
endDocumentin interfaceorg.xml.sax.ContentHandler- Throws:
org.xml.sax.SAXException
-
startPrefixMapping
public final void startPrefixMapping(java.lang.String prefix, java.lang.String uri)Binds the given prefix to the given namespaces.- Specified by:
startPrefixMappingin interfaceorg.xml.sax.ContentHandler- See Also:
SimpleNamespaceContext.bindNamespaceUri(String, String)
-
endPrefixMapping
public final void endPrefixMapping(java.lang.String prefix)
Removes the binding for the given prefix.- Specified by:
endPrefixMappingin interfaceorg.xml.sax.ContentHandler- See Also:
SimpleNamespaceContext.removeBinding(String)
-
startElement
public final void startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts) throws org.xml.sax.SAXException- Specified by:
startElementin interfaceorg.xml.sax.ContentHandler- Throws:
org.xml.sax.SAXException
-
endElement
public final void endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName) throws org.xml.sax.SAXException- Specified by:
endElementin interfaceorg.xml.sax.ContentHandler- Throws:
org.xml.sax.SAXException
-
characters
public final void characters(char[] ch, int start, int length) throws org.xml.sax.SAXException- Specified by:
charactersin interfaceorg.xml.sax.ContentHandler- Throws:
org.xml.sax.SAXException
-
ignorableWhitespace
public final void ignorableWhitespace(char[] ch, int start, int length) throws org.xml.sax.SAXException- Specified by:
ignorableWhitespacein interfaceorg.xml.sax.ContentHandler- Throws:
org.xml.sax.SAXException
-
processingInstruction
public final void processingInstruction(java.lang.String target, java.lang.String data) throws org.xml.sax.SAXException- Specified by:
processingInstructionin interfaceorg.xml.sax.ContentHandler- Throws:
org.xml.sax.SAXException
-
skippedEntity
public final void skippedEntity(java.lang.String name) throws org.xml.sax.SAXException- Specified by:
skippedEntityin interfaceorg.xml.sax.ContentHandler- Throws:
org.xml.sax.SAXException
-
-