Top Description Fields Constructors Methods
com.ctc.wstx.sw

public Class NonNsStreamWriter

extends TypedStreamWriter
Class Inheritance
Imports
java.io.IOException, java.util.*, javax.xml.XMLConstants, javax.xml.namespace.NamespaceContext, .QName, javax.xml.stream.XMLStreamWriter, .XMLStreamException, javax.xml.stream.events.Attribute, .StartElement, org.codehaus.stax2.ri.typed.AsciiValueEncoder, com.ctc.wstx.api.WriterConfig, com.ctc.wstx.cfg.ErrorConsts, .XmlConsts, com.ctc.wstx.sr.AttributeCollector, .InputElementStack, com.ctc.wstx.util.EmptyNamespaceContext, .StringVector

Implementation of XMLStreamWriter used when namespace support is not enabled. This means that only local names are used for elements and attributes; and if rudimentary namespace declarations need to be output, they are output using attribute writing methods.

Field Summary

Modifier and TypeField and Description
pack-priv TreeSet<String>
mAttrNames

Container for attribute names for current element; used only if uniqueness of attribute names is to be enforced.

pack-priv final StringVector
mElements

Stack of currently open start elements; only local names are included.

Inherited from com.ctc.wstx.sw.TypedStreamWriter:
mValueEncoderFactory

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected void
closeStartElement(boolean emptyElem)

Implements abstract com.ctc.wstx.sw.BaseStreamWriter.closeStartElement.

Method called to close an open start element, when another main-level element (not namespace declaration or attribute) is being output; except for end element which is handled differently.

public void
copyStartElement(InputElementStack elemStack, AttributeCollector attrCollector)

Implements abstract com.ctc.wstx.sw.BaseStreamWriter.copyStartElement.

Element copier method implementation suitable to be used with non-namespace-aware writers.

private void
doWriteEndTag(String
Name that the closing element should have; null if whatever is in stack should be used
expName
,
boolean
If true, is allowed to create the empty element if the closing element was truly empty; if false, has to write the full empty element no matter what
allowEmpty
)

Note

Caller has to do actual removal of the element from element stack, before calling this method.

private void
public QName
getCurrentElementName()

Implements abstract com.ctc.wstx.sw.BaseStreamWriter.getCurrentElementName.

Implements org.codehaus.stax2.validation.ValidationContext.getCurrentElementName.

Method that can be used to access name information of the innermost (top) element in the element stack.

public NamespaceContext
public String
getNamespaceURI(String prefix)

Implements abstract com.ctc.wstx.sw.BaseStreamWriter.getNamespaceURI.

Implements org.codehaus.stax2.validation.ValidationContext.getNamespaceURI.

Method that can be called by the validator to resolve a namespace prefix of the currently active top-level element.

public String
getPrefix(String
the uri the prefix is bound to
uri
)

Implements abstract com.ctc.wstx.sw.BaseStreamWriter.getPrefix.

Implements javax.xml.stream.XMLStreamWriter.getPrefix.

Gets the prefix the uri is bound to.

protected String
getTopElementDesc()

Implements abstract com.ctc.wstx.sw.BaseStreamWriter.getTopElementDesc.

Method needed for error message generation

public void
setDefaultNamespace(String
the uri to bind to the default namespace, may be null
uri
)

Implements abstract com.ctc.wstx.sw.BaseStreamWriter.setDefaultNamespace.

Implements javax.xml.stream.XMLStreamWriter.setDefaultNamespace.

Binds a URI to the default namespace This URI is bound in the scope of the current START_ELEMENT / END_ELEMENT pair.

public void
setNamespaceContext(NamespaceContext
the namespace context to use for this writer, may not be null
context
)

Implements abstract com.ctc.wstx.sw.BaseStreamWriter.setNamespaceContext.

Implements javax.xml.stream.XMLStreamWriter.setNamespaceContext.

Sets the current namespace context for prefix and uri bindings.

public void
setPrefix(String
the prefix to bind to the uri, may not be null
prefix
,
String
the uri to bind to the prefix, may be null
uri
)

Implements abstract com.ctc.wstx.sw.BaseStreamWriter.setPrefix.

Implements javax.xml.stream.XMLStreamWriter.setPrefix.

Sets the prefix the uri is bound to.

public String
validateQNamePrefix(QName name)

Implements abstract com.ctc.wstx.sw.BaseStreamWriter.validateQNamePrefix.

Method called before writing a QName via Typed Access API.

public void
writeAttribute(String
the local name of the attribute
localName
,
String
the value of the attribute
value
)

Implements abstract com.ctc.wstx.sw.BaseStreamWriter.writeAttribute.

Implements javax.xml.stream.XMLStreamWriter.writeAttribute.

Writes an attribute to the output stream without a prefix.

public void
writeAttribute(String
the uri of the prefix for this attribute
nsURI
,
String
the local name of the attribute
localName
,
String
the value of the attribute
value
)

Implements abstract com.ctc.wstx.sw.BaseStreamWriter.writeAttribute.

Implements javax.xml.stream.XMLStreamWriter.writeAttribute.

Writes an attribute to the output stream

public void
writeAttribute(String
the prefix for this attribute
prefix
,
String
the uri of the prefix for this attribute
nsURI
,
String
the local name of the attribute
localName
,
String
the value of the attribute
value
)

Implements abstract com.ctc.wstx.sw.BaseStreamWriter.writeAttribute.

Implements javax.xml.stream.XMLStreamWriter.writeAttribute.

Writes an attribute to the output stream

public void
writeDefaultNamespace(String
the uri to bind the default namespace to
nsURI
)

Implements abstract com.ctc.wstx.sw.BaseStreamWriter.writeDefaultNamespace.

Implements javax.xml.stream.XMLStreamWriter.writeDefaultNamespace.

Writes the default namespace to the stream

public void
writeEmptyElement(String
local name of the tag, may not be null
localName
)

Implements abstract com.ctc.wstx.sw.BaseStreamWriter.writeEmptyElement.

Implements javax.xml.stream.XMLStreamWriter.writeEmptyElement.

Writes an empty element tag to the output

public void
writeEmptyElement(String
the uri to bind the tag to, may not be null
nsURI
,
String
local name of the tag, may not be null
localName
)

Implements abstract com.ctc.wstx.sw.BaseStreamWriter.writeEmptyElement.

Implements javax.xml.stream.XMLStreamWriter.writeEmptyElement.

Writes an empty element tag to the output

public void
writeEmptyElement(String
the prefix of the tag, may not be null
prefix
,
String
local name of the tag, may not be null
localName
,
String
the uri to bind the tag to, may not be null
nsURI
)

Implements abstract com.ctc.wstx.sw.BaseStreamWriter.writeEmptyElement.

Implements javax.xml.stream.XMLStreamWriter.writeEmptyElement.

Writes an empty element tag to the output

public void
writeEndElement()

Implements abstract com.ctc.wstx.sw.BaseStreamWriter.writeEndElement.

Implements javax.xml.stream.XMLStreamWriter.writeEndElement.

Writes an end tag to the output relying on the internal state of the writer to determine the prefix and local name of the event.

public void
writeEndElement(QName name)

Implements abstract com.ctc.wstx.sw.BaseStreamWriter.writeEndElement.

Method called by javax.xml.stream.XMLEventWriter implementation (instead of the version that takes no argument), so that we can verify it does match the start element, if necessary

public void
writeFullEndElement()

Implements abstract com.ctc.wstx.sw.BaseStreamWriter.writeFullEndElement.

Implements org.codehaus.stax2.XMLStreamWriter2.writeFullEndElement.

Similar to writeEndElement, but never allows implicit creation of empty elements.

public void
writeNamespace(String
the prefix to bind this namespace to
prefix
,
String
the uri to bind the prefix to
nsURI
)

Implements abstract com.ctc.wstx.sw.BaseStreamWriter.writeNamespace.

Implements javax.xml.stream.XMLStreamWriter.writeNamespace.

Writes a namespace to the output stream If the prefix argument to this method is the empty string, "xmlns", or null this method will delegate to writeDefaultNamespace

public void
writeStartElement(String
local name of the tag, may not be null
localName
)

Implements abstract com.ctc.wstx.sw.BaseStreamWriter.writeStartElement.

Implements javax.xml.stream.XMLStreamWriter.writeStartElement.

Writes a start tag to the output.

public void
writeStartElement(String
the namespaceURI of the prefix to use, may not be null
nsURI
,
String
local name of the tag, may not be null
localName
)

Implements abstract com.ctc.wstx.sw.BaseStreamWriter.writeStartElement.

Implements javax.xml.stream.XMLStreamWriter.writeStartElement.

Writes a start tag to the output

public void
writeStartElement(String
the prefix of the tag, may not be null
prefix
,
String
local name of the tag, may not be null
localName
,
String
the uri to bind the prefix to, may not be null
nsURI
)

Implements abstract com.ctc.wstx.sw.BaseStreamWriter.writeStartElement.

Implements javax.xml.stream.XMLStreamWriter.writeStartElement.

Writes a start tag to the output

public void
writeStartElement(StartElement elem)

Implements abstract com.ctc.wstx.sw.BaseStreamWriter.writeStartElement.

Convenience method needed by javax.xml.stream.XMLEventWriter implementation, to use when writing a start element, and possibly its attributes and namespace declarations.

protected void
writeTypedAttribute(String prefix, String nsURI, String localName, AsciiValueEncoder enc)

Implements abstract com.ctc.wstx.sw.TypedStreamWriter.writeTypedAttribute.

Method that will write attribute with value that is known not to require additional escaping.

Inherited from com.ctc.wstx.sw.TypedStreamWriter:
valueEncoderFactorywriteBinarywriteBinarywriteBinaryAttributewriteBinaryAttributewriteBooleanwriteBooleanAttributewriteDecimalwriteDecimalAttributewriteDoublewriteDoubleArraywriteDoubleArrayAttributewriteDoubleAttributewriteFloatwriteFloatArraywriteFloatArrayAttributewriteFloatAttributewriteIntwriteIntArraywriteIntArrayAttributewriteIntAttributewriteIntegerwriteIntegerAttributewriteLongwriteLongArraywriteLongArrayAttributewriteLongAttributewriteQNamewriteQNameAttributewriteTypedElement

Field Detail

mAttrNamesback to summary
pack-priv TreeSet<String> mAttrNames

Container for attribute names for current element; used only if uniqueness of attribute names is to be enforced.

TreeSet is used mostly because clearing it up is faster than clearing up HashSet, and the only access is done by adding entries and see if an value was already set.

mElementsback to summary
pack-priv final StringVector mElements

Stack of currently open start elements; only local names are included.

Constructor Detail

NonNsStreamWriterback to summary
public NonNsStreamWriter(XmlWriter xw, String enc, WriterConfig cfg)

Method Detail

closeStartElementback to summary
protected void closeStartElement(boolean emptyElem) throws XMLStreamException

Implements abstract com.ctc.wstx.sw.BaseStreamWriter.closeStartElement.

Method called to close an open start element, when another main-level element (not namespace declaration or attribute) is being output; except for end element which is handled differently.

Annotations
@Override
copyStartElementback to summary
public void copyStartElement(InputElementStack elemStack, AttributeCollector attrCollector) throws IOException, XMLStreamException

Implements abstract com.ctc.wstx.sw.BaseStreamWriter.copyStartElement.

Element copier method implementation suitable to be used with non-namespace-aware writers. The only special thing here is that the copier can convert namespace declarations to equivalent attribute writes.

Annotations
@Override
doWriteEndTagback to summary
private void doWriteEndTag(String expName, boolean allowEmpty) throws XMLStreamException

Note

Caller has to do actual removal of the element from element stack, before calling this method.

Parameters
expName:String

Name that the closing element should have; null if whatever is in stack should be used

allowEmpty:boolean

If true, is allowed to create the empty element if the closing element was truly empty; if false, has to write the full empty element no matter what

doWriteStartElementback to summary
private void doWriteStartElement(String localName) throws XMLStreamException
getCurrentElementNameback to summary
public QName getCurrentElementName()

Implements abstract com.ctc.wstx.sw.BaseStreamWriter.getCurrentElementName.

Implements org.codehaus.stax2.validation.ValidationContext.getCurrentElementName.

Doc from org.codehaus.stax2.validation.ValidationContext.getCurrentElementName.

Method that can be used to access name information of the innermost (top) element in the element stack.

Returns:QName

Name of the element at the top of the current element stack, if any. During validation calls it refers to the element being processed (start or end tag), or its parent (when processing text nodes), or null (in document prolog and epilog).

Annotations
@Override
getNamespaceContextback to summary
public NamespaceContext getNamespaceContext()

Implements abstract com.ctc.wstx.sw.BaseStreamWriter.getNamespaceContext.

Implements javax.xml.stream.XMLStreamWriter.getNamespaceContext.

Doc from javax.xml.stream.XMLStreamWriter.getNamespaceContext.

Returns the current namespace context.

Returns:NamespaceContext

the current NamespaceContext

Annotations
@Override
getNamespaceURIback to summary
public String getNamespaceURI(String prefix)

Implements abstract com.ctc.wstx.sw.BaseStreamWriter.getNamespaceURI.

Implements org.codehaus.stax2.validation.ValidationContext.getNamespaceURI.

Doc from org.codehaus.stax2.validation.ValidationContext.getNamespaceURI.

Method that can be called by the validator to resolve a namespace prefix of the currently active top-level element. This may be necessary for things like DTD validators (which may need to heuristically guess proper namespace URI of attributes, esp. ones with default values).

Annotations
@Override
getPrefixback to summary
public String getPrefix(String uri)

Implements abstract com.ctc.wstx.sw.BaseStreamWriter.getPrefix.

Implements javax.xml.stream.XMLStreamWriter.getPrefix.

Doc from javax.xml.stream.XMLStreamWriter.getPrefix.

Gets the prefix the uri is bound to.

Parameters
uri:String

the uri the prefix is bound to

Returns:String

the prefix or null

Annotations
@Override
getTopElementDescback to summary
protected String getTopElementDesc()

Implements abstract com.ctc.wstx.sw.BaseStreamWriter.getTopElementDesc.

Doc from com.ctc.wstx.sw.BaseStreamWriter.getTopElementDesc.

Method needed for error message generation

Annotations
@Override
setDefaultNamespaceback to summary
public void setDefaultNamespace(String uri) throws XMLStreamException

Implements abstract com.ctc.wstx.sw.BaseStreamWriter.setDefaultNamespace.

Implements javax.xml.stream.XMLStreamWriter.setDefaultNamespace.

Doc from javax.xml.stream.XMLStreamWriter.setDefaultNamespace.

Binds a URI to the default namespace This URI is bound in the scope of the current START_ELEMENT / END_ELEMENT pair. If this method is called before a START_ELEMENT has been written the uri is bound in the root scope.

Parameters
uri:String

the uri to bind to the default namespace, may be null

Annotations
@Override
Exceptions
XMLStreamException:
if an error occurs
setNamespaceContextback to summary
public void setNamespaceContext(NamespaceContext context)

Implements abstract com.ctc.wstx.sw.BaseStreamWriter.setNamespaceContext.

Implements javax.xml.stream.XMLStreamWriter.setNamespaceContext.

Doc from javax.xml.stream.XMLStreamWriter.setNamespaceContext.

Sets the current namespace context for prefix and uri bindings. This context becomes the root namespace context for writing and will replace the current root namespace context. Subsequent calls to setPrefix and setDefaultNamespace will bind namespaces using the context passed to the method as the root context for resolving namespaces. This method may only be called once at the start of the document. It does not cause the namespaces to be declared. If a namespace URI to prefix mapping is found in the namespace context it is treated as declared and the prefix may be used by the StreamWriter.

Parameters
context:NamespaceContext

the namespace context to use for this writer, may not be null

Annotations
@Override
setPrefixback to summary
public void setPrefix(String prefix, String uri) throws XMLStreamException

Implements abstract com.ctc.wstx.sw.BaseStreamWriter.setPrefix.

Implements javax.xml.stream.XMLStreamWriter.setPrefix.

Doc from javax.xml.stream.XMLStreamWriter.setPrefix.

Sets the prefix the uri is bound to. This prefix is bound in the scope of the current START_ELEMENT / END_ELEMENT pair. If this method is called before a START_ELEMENT has been written the prefix is bound in the root scope.

Parameters
prefix:String

the prefix to bind to the uri, may not be null

uri:String

the uri to bind to the prefix, may be null

Annotations
@Override
Exceptions
XMLStreamException:
if an error occurs
validateQNamePrefixback to summary
public String validateQNamePrefix(QName name)

Implements abstract com.ctc.wstx.sw.BaseStreamWriter.validateQNamePrefix.

Doc from com.ctc.wstx.sw.BaseStreamWriter.validateQNamePrefix.

Method called before writing a QName via Typed Access API. In namespace-repairing mode it should take appropriate actions to ensure that the given namespace URI is bound to a namespace and return whatever it maps to. In non-repairing work no additional work is to be done and methods

Returns:String

Prefix to use when writing out given QName as an element or attribute value

Annotations
@Override
writeAttributeback to summary
public void writeAttribute(String localName, String value) throws XMLStreamException

Implements abstract com.ctc.wstx.sw.BaseStreamWriter.writeAttribute.

Implements javax.xml.stream.XMLStreamWriter.writeAttribute.

Doc from javax.xml.stream.XMLStreamWriter.writeAttribute.

Writes an attribute to the output stream without a prefix.

Parameters
localName:String

the local name of the attribute

value:String

the value of the attribute

Annotations
@Override
Exceptions
XMLStreamException:
if an error occurs
writeAttributeback to summary
public void writeAttribute(String nsURI, String localName, String value) throws XMLStreamException

Implements abstract com.ctc.wstx.sw.BaseStreamWriter.writeAttribute.

Implements javax.xml.stream.XMLStreamWriter.writeAttribute.

Doc from javax.xml.stream.XMLStreamWriter.writeAttribute.

Writes an attribute to the output stream

Parameters
nsURI:String

the uri of the prefix for this attribute

localName:String

the local name of the attribute

value:String

the value of the attribute

Annotations
@Override
Exceptions
XMLStreamException:
if the namespace URI has not been bound to a prefix and javax.xml.stream.isRepairingNamespaces has not been set to true
writeAttributeback to summary
public void writeAttribute(String prefix, String nsURI, String localName, String value) throws XMLStreamException

Implements abstract com.ctc.wstx.sw.BaseStreamWriter.writeAttribute.

Implements javax.xml.stream.XMLStreamWriter.writeAttribute.

Doc from javax.xml.stream.XMLStreamWriter.writeAttribute.

Writes an attribute to the output stream

Parameters
prefix:String

the prefix for this attribute

nsURI:String

the uri of the prefix for this attribute

localName:String

the local name of the attribute

value:String

the value of the attribute

Annotations
@Override
Exceptions
XMLStreamException:
if the namespace URI has not been bound to a prefix and javax.xml.stream.isRepairingNamespaces has not been set to true
writeDefaultNamespaceback to summary
public void writeDefaultNamespace(String nsURI) throws XMLStreamException

Implements abstract com.ctc.wstx.sw.BaseStreamWriter.writeDefaultNamespace.

Implements javax.xml.stream.XMLStreamWriter.writeDefaultNamespace.

Doc from javax.xml.stream.XMLStreamWriter.writeDefaultNamespace.

Writes the default namespace to the stream

Parameters
nsURI:String

the uri to bind the default namespace to

Annotations
@Override
Exceptions
XMLStreamException:
if an error occurs
writeEmptyElementback to summary
public void writeEmptyElement(String localName) throws XMLStreamException

Implements abstract com.ctc.wstx.sw.BaseStreamWriter.writeEmptyElement.

Implements javax.xml.stream.XMLStreamWriter.writeEmptyElement.

Doc from javax.xml.stream.XMLStreamWriter.writeEmptyElement.

Writes an empty element tag to the output

Parameters
localName:String

local name of the tag, may not be null

Annotations
@Override
Exceptions
XMLStreamException:
if an error occurs
writeEmptyElementback to summary
public void writeEmptyElement(String nsURI, String localName) throws XMLStreamException

Implements abstract com.ctc.wstx.sw.BaseStreamWriter.writeEmptyElement.

Implements javax.xml.stream.XMLStreamWriter.writeEmptyElement.

Doc from javax.xml.stream.XMLStreamWriter.writeEmptyElement.

Writes an empty element tag to the output

Parameters
nsURI:String

the uri to bind the tag to, may not be null

localName:String

local name of the tag, may not be null

Annotations
@Override
Exceptions
XMLStreamException:
if the namespace URI has not been bound to a prefix and javax.xml.stream.isRepairingNamespaces has not been set to true
writeEmptyElementback to summary
public void writeEmptyElement(String prefix, String localName, String nsURI) throws XMLStreamException

Implements abstract com.ctc.wstx.sw.BaseStreamWriter.writeEmptyElement.

Implements javax.xml.stream.XMLStreamWriter.writeEmptyElement.

Doc from javax.xml.stream.XMLStreamWriter.writeEmptyElement.

Writes an empty element tag to the output

Parameters
prefix:String

the prefix of the tag, may not be null

localName:String

local name of the tag, may not be null

nsURI:String

the uri to bind the tag to, may not be null

Annotations
@Override
Exceptions
XMLStreamException:
if an error occurs
writeEndElementback to summary
public void writeEndElement() throws XMLStreamException

Implements abstract com.ctc.wstx.sw.BaseStreamWriter.writeEndElement.

Implements javax.xml.stream.XMLStreamWriter.writeEndElement.

Doc from javax.xml.stream.XMLStreamWriter.writeEndElement.

Writes an end tag to the output relying on the internal state of the writer to determine the prefix and local name of the event.

Annotations
@Override
Exceptions
XMLStreamException:
if an error occurs
writeEndElementback to summary
public void writeEndElement(QName name) throws XMLStreamException

Implements abstract com.ctc.wstx.sw.BaseStreamWriter.writeEndElement.

Method called by javax.xml.stream.XMLEventWriter implementation (instead of the version that takes no argument), so that we can verify it does match the start element, if necessary

Annotations
@Override
writeFullEndElementback to summary
public void writeFullEndElement() throws XMLStreamException

Implements abstract com.ctc.wstx.sw.BaseStreamWriter.writeFullEndElement.

Implements org.codehaus.stax2.XMLStreamWriter2.writeFullEndElement.

Similar to writeEndElement, but never allows implicit creation of empty elements.

Annotations
@Override
writeNamespaceback to summary
public void writeNamespace(String prefix, String nsURI) throws XMLStreamException

Implements abstract com.ctc.wstx.sw.BaseStreamWriter.writeNamespace.

Implements javax.xml.stream.XMLStreamWriter.writeNamespace.

Doc from javax.xml.stream.XMLStreamWriter.writeNamespace.

Writes a namespace to the output stream If the prefix argument to this method is the empty string, "xmlns", or null this method will delegate to writeDefaultNamespace

Parameters
prefix:String

the prefix to bind this namespace to

nsURI:String

the uri to bind the prefix to

Annotations
@Override
Exceptions
XMLStreamException:
if an error occurs
writeStartElementback to summary
public void writeStartElement(String localName) throws XMLStreamException

Implements abstract com.ctc.wstx.sw.BaseStreamWriter.writeStartElement.

Implements javax.xml.stream.XMLStreamWriter.writeStartElement.

Doc from javax.xml.stream.XMLStreamWriter.writeStartElement.

Writes a start tag to the output. All writeStartElement methods open a new scope in the internal namespace context. Writing the corresponding EndElement causes the scope to be closed.

Parameters
localName:String

local name of the tag, may not be null

Annotations
@Override
Exceptions
XMLStreamException:
if an error occurs
writeStartElementback to summary
public void writeStartElement(String nsURI, String localName) throws XMLStreamException

Implements abstract com.ctc.wstx.sw.BaseStreamWriter.writeStartElement.

Implements javax.xml.stream.XMLStreamWriter.writeStartElement.

Doc from javax.xml.stream.XMLStreamWriter.writeStartElement.

Writes a start tag to the output

Parameters
nsURI:String

the namespaceURI of the prefix to use, may not be null

localName:String

local name of the tag, may not be null

Annotations
@Override
Exceptions
XMLStreamException:
if the namespace URI has not been bound to a prefix and javax.xml.stream.isRepairingNamespaces has not been set to true
writeStartElementback to summary
public void writeStartElement(String prefix, String localName, String nsURI) throws XMLStreamException

Implements abstract com.ctc.wstx.sw.BaseStreamWriter.writeStartElement.

Implements javax.xml.stream.XMLStreamWriter.writeStartElement.

Doc from javax.xml.stream.XMLStreamWriter.writeStartElement.

Writes a start tag to the output

Parameters
prefix:String

the prefix of the tag, may not be null

localName:String

local name of the tag, may not be null

nsURI:String

the uri to bind the prefix to, may not be null

Annotations
@Override
Exceptions
XMLStreamException:
if an error occurs
writeStartElementback to summary
public void writeStartElement(StartElement elem) throws XMLStreamException

Implements abstract com.ctc.wstx.sw.BaseStreamWriter.writeStartElement.

Doc from com.ctc.wstx.sw.BaseStreamWriter.writeStartElement.

Convenience method needed by javax.xml.stream.XMLEventWriter implementation, to use when writing a start element, and possibly its attributes and namespace declarations.

Annotations
@Override
writeTypedAttributeback to summary
protected void writeTypedAttribute(String prefix, String nsURI, String localName, AsciiValueEncoder enc) throws XMLStreamException

Implements abstract com.ctc.wstx.sw.TypedStreamWriter.writeTypedAttribute.

Doc from com.ctc.wstx.sw.TypedStreamWriter.writeTypedAttribute.

Method that will write attribute with value that is known not to require additional escaping.

Annotations
@Override