Package org.exolab.castor.xml.util
Class StaxEventHandler
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.exolab.castor.xml.util.StaxEventHandler
- All Implemented Interfaces:
ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
A document handler that uses internally a instance of
XMLEventWriter
to
output the result xml.- Since:
- 1.3.3
- Version:
- 1.3.3
- Author:
- Jakub Narloch
-
Constructor Summary
ConstructorsConstructorDescriptionStaxEventHandler
(XMLEventWriter xmlEventWriter) Creates new instance ofStaxEventHandler
with givenXMLEventWriter
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
characters
(char[] ch, int start, int length) void
void
endElement
(String uri, String localName, String qName) void
ignorableWhitespace
(char[] ch, int start, int length) void
processingInstruction
(String target, String data) void
void
startElement
(String uri, String localName, String qName, Attributes attributes) void
startPrefixMapping
(String prefix, String uri) Methods inherited from class org.xml.sax.helpers.DefaultHandler
endPrefixMapping, error, fatalError, notationDecl, resolveEntity, setDocumentLocator, skippedEntity, unparsedEntityDecl, warning
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.xml.sax.ContentHandler
declaration
-
Constructor Details
-
StaxEventHandler
Creates new instance ofStaxEventHandler
with givenXMLEventWriter
.- Parameters:
xmlEventWriter
- theXMLEventWriter
to be used- Throws:
IllegalArgumentException
- if xmlEventWriter is null
-
-
Method Details
-
startDocument
- Specified by:
startDocument
in interfaceContentHandler
- Overrides:
startDocument
in classDefaultHandler
- Throws:
SAXException
-
endDocument
- Specified by:
endDocument
in interfaceContentHandler
- Overrides:
endDocument
in classDefaultHandler
- Throws:
SAXException
-
startPrefixMapping
- Specified by:
startPrefixMapping
in interfaceContentHandler
- Overrides:
startPrefixMapping
in classDefaultHandler
- Throws:
SAXException
-
startElement
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException - Specified by:
startElement
in interfaceContentHandler
- Overrides:
startElement
in classDefaultHandler
- Throws:
SAXException
-
endElement
- Specified by:
endElement
in interfaceContentHandler
- Overrides:
endElement
in classDefaultHandler
- Throws:
SAXException
-
ignorableWhitespace
- Specified by:
ignorableWhitespace
in interfaceContentHandler
- Overrides:
ignorableWhitespace
in classDefaultHandler
- Throws:
SAXException
-
characters
- Specified by:
characters
in interfaceContentHandler
- Overrides:
characters
in classDefaultHandler
- Throws:
SAXException
-
processingInstruction
- Specified by:
processingInstruction
in interfaceContentHandler
- Overrides:
processingInstruction
in classDefaultHandler
- Throws:
SAXException
-