APIdia Launch Partner
Top Fields Constructors Methods
com.sun.org.apache.xalan.internal.xsltc.trax

public Class SAX2StAXEventWriter

extends SAX2StAXBaseWriter
Class Inheritance
Imports
java.util.ArrayList, .Collection, .Collections, .HashMap, .Iterator, .List, .Map, javax.xml.stream.XMLEventFactory, .XMLEventWriter, .XMLStreamException, javax.xml.stream.events.*, org.xml.sax.Attributes, .SAXException

Author
Sunitha Reddy

Field Summary

Modifier and TypeField and Description
private XMLEventFactory
private List<Collection<Namespace>>
private boolean
private XMLEventWriter
Inherited from com.sun.org.apache.xalan.internal.xsltc.trax.SAX2StAXBaseWriter:
CDATABufferdocLocatorencodingisCDATAnamespacesreporterxmlVersion

Constructor Summary

AccessConstructor and Description
public
public
public

Method Summary

Modifier and TypeMethod and Description
public void
characters(char[] ch, int start, int length)

Overrides com.sun.org.apache.xalan.internal.xsltc.trax.SAX2StAXBaseWriter.characters.

Implements org.xml.sax.ContentHandler.characters.

Receive notification of character data inside an element.

public void
comment(char[] ch, int start, int length)

Overrides com.sun.org.apache.xalan.internal.xsltc.trax.SAX2StAXBaseWriter.comment.

Implements org.xml.sax.ext.LexicalHandler.comment.

Report an XML comment anywhere in the document.

protected Namespace
protected void
public void
public void
public void
endElement(String uri, String localName, String qName)

Overrides com.sun.org.apache.xalan.internal.xsltc.trax.SAX2StAXBaseWriter.endElement.

Implements org.xml.sax.ContentHandler.endElement.

Receive notification of the end of an element.

public XMLEventFactory
public XMLEventWriter
public void
ignorableWhitespace(char[] ch, int start, int length)

Overrides org.xml.sax.helpers.DefaultHandler.ignorableWhitespace.

Implements org.xml.sax.ContentHandler.ignorableWhitespace.

Receive notification of ignorable whitespace in element content.

public void
public void
public void
public void
public void
startElement(String uri, String localName, String qName, Attributes attributes)

Overrides com.sun.org.apache.xalan.internal.xsltc.trax.SAX2StAXBaseWriter.startElement.

Implements org.xml.sax.ContentHandler.startElement.

Receive notification of the start of an element.

pack-priv void
Inherited from com.sun.org.apache.xalan.internal.xsltc.trax.SAX2StAXBaseWriter:
endDTDendEntityendPrefixMappingerrorfatalErrorgetCurrentLocationparseQNamereportExceptionsetDocumentLocatorsetEncodingsetXMLReportersetXmlVersionstartCDATAstartDTDstartEntitystartPrefixMappingwarning

Field Detail

eventFactoryback to summary
private XMLEventFactory eventFactory
namespaceStackback to summary
private List<Collection<Namespace>> namespaceStack
needToCallStartDocumentback to summary
private boolean needToCallStartDocument
writerback to summary
private XMLEventWriter writer

Constructor Detail

SAX2StAXEventWriterback to summary
public SAX2StAXEventWriter()
SAX2StAXEventWriterback to summary
public SAX2StAXEventWriter(XMLEventWriter writer)
SAX2StAXEventWriterback to summary
public SAX2StAXEventWriter(XMLEventWriter writer, XMLEventFactory factory)

Method Detail

charactersback to summary
public void characters(char[] ch, int start, int length) throws SAXException

Overrides com.sun.org.apache.xalan.internal.xsltc.trax.SAX2StAXBaseWriter.characters.

Implements org.xml.sax.ContentHandler.characters.

Doc from org.xml.sax.helpers.DefaultHandler.characters.

Receive notification of character data inside an element.

By default, do nothing. Application writers may override this method to take specific actions for each chunk of character data (such as adding the data to a node or buffer, or printing it to a file).

Exceptions
SAXException:
Any SAX exception, possibly wrapping another exception.
commentback to summary
public void comment(char[] ch, int start, int length) throws SAXException

Overrides com.sun.org.apache.xalan.internal.xsltc.trax.SAX2StAXBaseWriter.comment.

Implements org.xml.sax.ext.LexicalHandler.comment.

Doc from org.xml.sax.ext.LexicalHandler.comment.

Report an XML comment anywhere in the document.

This callback will be used for comments inside or outside the document element, including comments in the external DTD subset (if read). Comments in the DTD must be properly nested inside start/endDTD and start/endEntity events (if used).

Exceptions
SAXException:
The application may raise an exception.
createNamespaceback to summary
protected Namespace createNamespace(String prefix, String uri)
createStartEventsback to summary
protected void createStartEvents(Attributes attributes, Collection<Attribute>[] events)
Annotations
@SuppressWarnings:unchecked
endCDATAback to summary
public void endCDATA() throws SAXException

Overrides com.sun.org.apache.xalan.internal.xsltc.trax.SAX2StAXBaseWriter.endCDATA.

Implements org.xml.sax.ext.LexicalHandler.endCDATA.

Doc from org.xml.sax.ext.LexicalHandler.endCDATA.

Report the end of a CDATA section.

Exceptions
SAXException:
The application may raise an exception.
endDocumentback to summary
public void endDocument() throws SAXException

Overrides com.sun.org.apache.xalan.internal.xsltc.trax.SAX2StAXBaseWriter.endDocument.

Implements org.xml.sax.ContentHandler.endDocument.

Doc from org.xml.sax.helpers.DefaultHandler.endDocument.

Receive notification of the end of the document.

By default, do nothing. Application writers may override this method in a subclass to take specific actions at the end of a document (such as finalising a tree or closing an output file).

Exceptions
SAXException:
Any SAX exception, possibly wrapping another exception.
endElementback to summary
public void endElement(String uri, String localName, String qName) throws SAXException

Overrides com.sun.org.apache.xalan.internal.xsltc.trax.SAX2StAXBaseWriter.endElement.

Implements org.xml.sax.ContentHandler.endElement.

Doc from org.xml.sax.helpers.DefaultHandler.endElement.

Receive notification of the end of an element.

By default, do nothing. Application writers may override this method in a subclass to take specific actions at the end of each element (such as finalising a tree node or writing output to a file).

Exceptions
SAXException:
Any SAX exception, possibly wrapping another exception.
getEventFactoryback to summary
public XMLEventFactory getEventFactory()
getEventWriterback to summary
public XMLEventWriter getEventWriter()
ignorableWhitespaceback to summary
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException

Overrides org.xml.sax.helpers.DefaultHandler.ignorableWhitespace.

Implements org.xml.sax.ContentHandler.ignorableWhitespace.

Doc from org.xml.sax.helpers.DefaultHandler.ignorableWhitespace.

Receive notification of ignorable whitespace in element content.

By default, do nothing. Application writers may override this method to take specific actions for each chunk of ignorable whitespace (such as adding data to a node or buffer, or printing it to a file).

Exceptions
SAXException:
Any SAX exception, possibly wrapping another exception.
processingInstructionback to summary
public void processingInstruction(String target, String data) throws SAXException

Overrides org.xml.sax.helpers.DefaultHandler.processingInstruction.

Implements org.xml.sax.ContentHandler.processingInstruction.

Doc from org.xml.sax.helpers.DefaultHandler.processingInstruction.

Receive notification of a processing instruction.

By default, do nothing. Application writers may override this method in a subclass to take specific actions for each processing instruction, such as setting status variables or invoking other methods.

Exceptions
SAXException:
Any SAX exception, possibly wrapping another exception.
setEventFactoryback to summary
public void setEventFactory(XMLEventFactory factory)
setEventWriterback to summary
public void setEventWriter(XMLEventWriter writer)
startDocumentback to summary
public void startDocument() throws SAXException

Overrides com.sun.org.apache.xalan.internal.xsltc.trax.SAX2StAXBaseWriter.startDocument.

Implements org.xml.sax.ContentHandler.startDocument.

Doc from org.xml.sax.helpers.DefaultHandler.startDocument.

Receive notification of the beginning of the document.

By default, do nothing. Application writers may override this method in a subclass to take specific actions at the beginning of a document (such as allocating the root node of a tree or creating an output file).

Exceptions
SAXException:
Any SAX exception, possibly wrapping another exception.
startElementback to summary
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException

Overrides com.sun.org.apache.xalan.internal.xsltc.trax.SAX2StAXBaseWriter.startElement.

Implements org.xml.sax.ContentHandler.startElement.

Doc from org.xml.sax.helpers.DefaultHandler.startElement.

Receive notification of the start of an element.

By default, do nothing. Application writers may override this method in a subclass to take specific actions at the start of each element (such as allocating a new tree node or writing output to a file).

Annotations
@SuppressWarnings:rawtypes, unchecked
Exceptions
SAXException:
Any SAX exception, possibly wrapping another exception.
writeStartDocumentback to summary
pack-priv void writeStartDocument() throws SAXException

Overrides com.sun.org.apache.xalan.internal.xsltc.trax.SAX2StAXBaseWriter.writeStartDocument.