- All Superinterfaces:
- All Known Implementing Classes:
public interface BuildingStreamWriter extends javax.xml.stream.XMLStreamWriterA BuildingStreamWriter allows a document to be constructed by calling the methods defined in the
XMLStreamWriterinterface; after the document has been constructed, its root node may be retrieved by calling the
The class will attempt to generate namespace prefixes where none have been supplied, unless the
inventPrefixesoption is set to false. The preferred mode of use is to call the versions of
writeAttributethat supply the prefix, URI, and local name in full. If the prefix is omitted, the class attempts to invent a prefix. If the URI is omitted, the name is assumed to be in no namespace. The
writeNamespacemethod should be called only if there is a need to declare a namespace prefix that is not used on any element or attribute name.
The class will check all names, URIs, and character content for conformance against XML well-formedness rules unless the
checkValuesoption is set to false.
BuildingStreamWriterfor a particular object model can be obtained by calling
All Methods Instance Methods Abstract Methods Modifier and Type Method Description
getDocumentNode()After building the document by writing a sequence of events, retrieve the root node of the constructed document tree
isCheckValues()Ask whether names and values are to be checked for conformance with XML rules
setCheckValues(boolean check)Say whether names and values are to be checked for conformance with XML rules
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
XdmNode getDocumentNode() throws SaxonApiException
- 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.
SaxonApiException- if any failure occurs
void setCheckValues(boolean check)Say whether names and values are to be checked for conformance with XML rules
check- true if names and values are to be checked. Default is true.
boolean isCheckValues()Ask whether names and values are to be checked for conformance with XML rules
- true if names and values are to be checked. Default is true.