Package net.sf.saxon.s9api
Class BuildingStreamWriterImpl
java.lang.Object
net.sf.saxon.event.StreamWriterToReceiver
net.sf.saxon.s9api.BuildingStreamWriterImpl
- All Implemented Interfaces:
XMLStreamWriter
,BuildingStreamWriter
public class BuildingStreamWriterImpl
extends StreamWriterToReceiver
implements BuildingStreamWriter
This class is an implementation of
XMLStreamWriter
, allowing
a document to be constructed by means of a series of XMLStreamWriter method calls such
as writeStartElement(), writeAttribute(), writeCharacters(), and writeEndElement().
The detailed way in which this class is packaged is carefully designed to ensure that
if the functionality is not used, the DocumentBuilder
is still usable under
JDK 1.5 (which does not include javax.xml.stream interfaces).
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAfter building the document by writing a sequence of events, retrieve the root node of the constructed document treeMethods inherited from class net.sf.saxon.event.StreamWriterToReceiver
close, flush, getNamespaceContext, getPrefix, getProperty, isCheckValues, isInventPrefixes, setCheckValues, setDefaultNamespace, setInventPrefixes, setNamespaceContext, setPrefix, writeAttribute, writeAttribute, writeAttribute, writeCData, writeCharacters, writeCharacters, writeComment, writeDefaultNamespace, writeDTD, writeEmptyElement, writeEmptyElement, writeEmptyElement, writeEndDocument, writeEndElement, writeEntityRef, writeNamespace, writeProcessingInstruction, writeProcessingInstruction, writeStartDocument, writeStartDocument, writeStartDocument, writeStartElement, writeStartElement, writeStartElement
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.sf.saxon.s9api.BuildingStreamWriter
isCheckValues, isInventPrefixes, setCheckValues, setInventPrefixes
Methods inherited from interface javax.xml.stream.XMLStreamWriter
close, flush, getNamespaceContext, getPrefix, getProperty, setDefaultNamespace, setNamespaceContext, setPrefix, writeAttribute, writeAttribute, writeAttribute, writeCData, writeCharacters, writeCharacters, writeComment, writeDefaultNamespace, writeDTD, writeEmptyElement, writeEmptyElement, writeEmptyElement, writeEndDocument, writeEndElement, writeEntityRef, writeNamespace, writeProcessingInstruction, writeProcessingInstruction, writeStartDocument, writeStartDocument, writeStartDocument, writeStartElement, writeStartElement, writeStartElement
-
Field Details
-
builder
Builder builder
-
-
Constructor Details
-
BuildingStreamWriterImpl
-
-
Method Details
-
getDocumentNode
Description copied from interface:BuildingStreamWriter
After building the document by writing a sequence of events, retrieve the root node of the constructed document tree- Specified by:
getDocumentNode
in interfaceBuildingStreamWriter
- Returns:
- the root node of the constructed tree. The result is undefined (maybe null, maybe an exception)
if the method is called before successfully completing the sequence of events (of which the last should be
XMLStreamWriter.writeEndDocument()
) that constructs the tree. - Throws:
SaxonApiException
- if any failure occurs
-