Class Stax2WriterAdapter
- All Implemented Interfaces:
XMLStreamConstants
,XMLStreamWriter
,TypedXMLStreamWriter
,Validatable
,XMLStreamWriter2
XMLStreamWriter2
, the
extended stream writer defined by Stax2 extension, by wrapping
a vanilla Stax 1.0 XMLStreamReader
implementation.
Note: the implementation is incomplete as-is, since not all features needed are accessible via basic Stax 1.0 interface. As such, two main use cases for this wrapper are:
- Serve as convenient base class for a complete implementation, which can use native accessors provided by the wrapped Stax implementation
- To be used for tasks that make limited use of Stax2 API, such that missing parts are not needed
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
Encoding we have determined to be used, according to method calls (write start document etc.)protected final boolean
protected SimpleValueEncoder
Fields inherited from class org.codehaus.stax2.util.StreamWriterDelegate
mDelegate
Fields inherited from interface javax.xml.stream.XMLStreamConstants
ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Method similar toXMLStreamWriter.close()
, except that this method also does close the underlying output destination (stream) if it has not yet been closed.void
copyEventFromReader
(XMLStreamReader2 sr, boolean preserveEventData) Method that essentially copies event that the specified reader has just read.protected void
Method that can be called to get information about encoding that this writer is using (or at least claims is using).Method that should return current output location, if the writer keeps track of it; null if it does not.protected SimpleValueEncoder
boolean
isPropertySupported
(String name) Method similar toXMLOutputFactory.isPropertySupported(java.lang.String)
, used to determine whether a property is supported by the Writer instance.protected String
serializeQNameValue
(QName name) Method called to serialize given qualified name into valid String serialization, taking into account existing namespace bindings.boolean
setProperty
(String name, Object value) Method that can be used to set per-writer properties; a subset of properties one can set via matchingXMLOutputFactory2
instance.Method that application can call to define a custom handler for validation problems encountered during validation process.Method that can be called by application to stop validating output against a schema, for whichValidatable.validateAgainst(org.codehaus.stax2.validation.XMLValidationSchema)
was called earlier.stopValidatingAgainst
(XMLValidator validator) Method that can be called by application to stop validating output using specified validator.validateAgainst
(XMLValidationSchema schema) Method that will construct aXMLValidator
instance from the given schema (unless a validator for that schema has already been added), initialize it if necessary, and make validatable object (reader, writer) call appropriate validation methods from this point on until the end of the document (that is, it's not scoped with sub-trees), or until validator is removed by an explicit call toValidatable.stopValidatingAgainst(org.codehaus.stax2.validation.XMLValidationSchema)
.static XMLStreamWriter2
Method that should be used to add dynamic support forXMLStreamWriter2
.void
writeBinary
(byte[] value, int from, int length) Write binary content as base64 encoded characters to the output.void
writeBinary
(Base64Variant v, byte[] value, int from, int length) void
writeBinaryAttribute
(String prefix, String nsURI, String localName, byte[] value) Write a byte array attribute.void
writeBinaryAttribute
(Base64Variant v, String prefix, String nsURI, String localName, byte[] value) void
writeBoolean
(boolean b) Write a boolean value to the output as textual element content.void
writeBooleanAttribute
(String prefix, String nsURI, String localName, boolean b) Write a boolean value to the output as attribute value.void
writeCData
(char[] text, int start, int len) void
writeDecimal
(BigDecimal value) Write a decimal value to the output as textual element content.void
writeDecimalAttribute
(String prefix, String nsURI, String localName, BigDecimal value) void
writeDouble
(double value) Write a double value to the output as textual element content.void
writeDoubleArray
(double[] value, int from, int length) void
writeDoubleArrayAttribute
(String prefix, String nsURI, String localName, double[] value) void
writeDoubleAttribute
(String prefix, String nsURI, String localName, double value) void
void
writeFloat
(float value) Write a float value to the output as textual element content.void
writeFloatArray
(float[] value, int from, int length) void
writeFloatArrayAttribute
(String prefix, String nsURI, String localName, float[] value) void
writeFloatAttribute
(String prefix, String nsURI, String localName, float value) void
Method similar toXMLStreamWriter.writeEndElement()
, but that will always write the full end element, instead of empty element.void
writeInt
(int value) Write an int value to the output as textual element content.void
writeIntArray
(int[] value, int from, int length) Write int array to the output.void
writeIntArrayAttribute
(String prefix, String nsURI, String localName, int[] value) Write int array attribute.void
writeIntAttribute
(String prefix, String nsURI, String localName, int value) Write an integer value to the output as attribute value.void
writeInteger
(BigInteger value) void
writeIntegerAttribute
(String prefix, String nsURI, String localName, BigInteger value) void
writeLong
(long value) Write a long value to the output as textual element content.void
writeLongArray
(long[] value, int from, int length) void
writeLongArrayAttribute
(String prefix, String nsURI, String localName, long[] value) void
writeLongAttribute
(String prefix, String nsURI, String localName, long value) Write an long value to the output as attribute value.void
writeQName
(QName name) void
writeQNameAttribute
(String prefix, String nsURI, String localName, QName name) void
writeRaw
(char[] text, int offset, int length) Method that writes specified content as is, without encoding or deciphering it in any way.void
Method that writes specified content as is, without encoding or deciphering it in any way.void
Method that writes specified content as is, without encoding or deciphering it in any way.void
writeSpace
(char[] text, int offset, int length) Method that can be called to write whitespace-only content.void
writeSpace
(String text) Method that can be called to write whitespace-only content.void
writeStartDocument
(String version, String encoding, boolean standAlone) Methods inherited from class org.codehaus.stax2.util.StreamWriterDelegate
close, flush, getNamespaceContext, getParent, getPrefix, getProperty, setDefaultNamespace, setNamespaceContext, setParent, 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 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
-
mEncoding
Encoding we have determined to be used, according to method calls (write start document etc.) -
mValueEncoder
-
mNsRepairing
protected final boolean mNsRepairing
-
-
Constructor Details
-
Stax2WriterAdapter
-
-
Method Details
-
wrapIfNecessary
Method that should be used to add dynamic support forXMLStreamWriter2
. Method will check whether the stream reader passed happens to be aXMLStreamWriter2
; and if it is, return it properly cast. If not, it will create necessary wrapper to support features needed by StaxMate, using vanilla Stax 1.0 interface. -
writeBoolean
Description copied from interface:TypedXMLStreamWriter
Write a boolean value to the output as textual element content. The lexical representation of content is defined by the XML Schema boolean data type.- Specified by:
writeBoolean
in interfaceTypedXMLStreamWriter
- Parameters:
b
- The boolean value to write.- Throws:
XMLStreamException
-
writeInt
Description copied from interface:TypedXMLStreamWriter
Write an int value to the output as textual element content. The lexical representation of content is defined by the XML Schema integer data type.- Specified by:
writeInt
in interfaceTypedXMLStreamWriter
- Throws:
XMLStreamException
-
writeLong
Description copied from interface:TypedXMLStreamWriter
Write a long value to the output as textual element content. The lexical representation of content is defined by the XML Schema long data type.- Specified by:
writeLong
in interfaceTypedXMLStreamWriter
- Throws:
XMLStreamException
-
writeFloat
Description copied from interface:TypedXMLStreamWriter
Write a float value to the output as textual element content. The lexical representation of content is defined by the XML Schema float data type.- Specified by:
writeFloat
in interfaceTypedXMLStreamWriter
- Throws:
XMLStreamException
-
writeDouble
Description copied from interface:TypedXMLStreamWriter
Write a double value to the output as textual element content. The lexical representation of content is defined by the XML Schema double data type.- Specified by:
writeDouble
in interfaceTypedXMLStreamWriter
- Throws:
XMLStreamException
-
writeInteger
- Specified by:
writeInteger
in interfaceTypedXMLStreamWriter
- Throws:
XMLStreamException
-
writeDecimal
Description copied from interface:TypedXMLStreamWriter
Write a decimal value to the output as textual element content. The lexical representation of content is defined by the XML Schema decimal data type.- Specified by:
writeDecimal
in interfaceTypedXMLStreamWriter
- Throws:
XMLStreamException
-
writeQName
- Specified by:
writeQName
in interfaceTypedXMLStreamWriter
- Throws:
XMLStreamException
-
writeIntArray
Description copied from interface:TypedXMLStreamWriter
Write int array to the output. The lexical representation of a int array is defined by the following XML schema type:
<xs:simpleType name="intArray"> <xs:list itemType="xs:int"/> </xs:simpleType>
whose lexical space is a list of space-separated ints. This method can be called multiple times to write the array in chunks.- Specified by:
writeIntArray
in interfaceTypedXMLStreamWriter
- Parameters:
value
- The array from which to write the ints.from
- The index in the array from which writing starts.length
- The number of ints to write.- Throws:
XMLStreamException
-
writeLongArray
- Specified by:
writeLongArray
in interfaceTypedXMLStreamWriter
- Throws:
XMLStreamException
-
writeFloatArray
- Specified by:
writeFloatArray
in interfaceTypedXMLStreamWriter
- Throws:
XMLStreamException
-
writeDoubleArray
- Specified by:
writeDoubleArray
in interfaceTypedXMLStreamWriter
- Throws:
XMLStreamException
-
writeBinary
public void writeBinary(Base64Variant v, byte[] value, int from, int length) throws XMLStreamException - Specified by:
writeBinary
in interfaceTypedXMLStreamWriter
- Throws:
XMLStreamException
-
writeBinary
Description copied from interface:TypedXMLStreamWriter
Write binary content as base64 encoded characters to the output. The lexical representation of a byte array is defined by the XML Schema base64Binary data type. This method can be called multiple times to write the array in chunks; but if so, callers should write output in chunks divisible by 3 (natural atomic unit of base64 output, which avoids padding) to maximize interoperability.
Note: base64 variant defaults to
Base64Variants.MIME
.- Specified by:
writeBinary
in interfaceTypedXMLStreamWriter
- Parameters:
value
- The array from which to write the bytes.from
- The index in the array from which writing starts.length
- The number of bytes to write.- Throws:
XMLStreamException
-
writeBooleanAttribute
public void writeBooleanAttribute(String prefix, String nsURI, String localName, boolean b) throws XMLStreamException Description copied from interface:TypedXMLStreamWriter
Write a boolean value to the output as attribute value. The lexical representation of content is defined by the XML Schema boolean data type.- Specified by:
writeBooleanAttribute
in interfaceTypedXMLStreamWriter
- Parameters:
prefix
- The attribute's prefix. Null or "" if no prefix is to be usednsURI
- The attribute's URI (can be either null or empty String for "no namespace")localName
- The attribute's local nameb
- The boolean value to write.- Throws:
XMLStreamException
-
writeIntAttribute
public void writeIntAttribute(String prefix, String nsURI, String localName, int value) throws XMLStreamException Description copied from interface:TypedXMLStreamWriter
Write an integer value to the output as attribute value. The lexical representation of content is defined by the XML Schema integer data type.- Specified by:
writeIntAttribute
in interfaceTypedXMLStreamWriter
- Parameters:
prefix
- The attribute's prefix. Null or "" if no prefix is to be usednsURI
- The attribute's URI (can be either null or empty String for "no namespace")localName
- The attribute's local namevalue
- The integer value to write.- Throws:
XMLStreamException
-
writeLongAttribute
public void writeLongAttribute(String prefix, String nsURI, String localName, long value) throws XMLStreamException Description copied from interface:TypedXMLStreamWriter
Write an long value to the output as attribute value. The lexical representation of content is defined by the XML Schema long data type.- Specified by:
writeLongAttribute
in interfaceTypedXMLStreamWriter
- Parameters:
prefix
- The attribute's prefix. Null or "" if no prefix is to be usednsURI
- The attribute's URI (can be either null or empty String for "no namespace")localName
- The attribute's local namevalue
- The long value to write.- Throws:
XMLStreamException
-
writeFloatAttribute
public void writeFloatAttribute(String prefix, String nsURI, String localName, float value) throws XMLStreamException - Specified by:
writeFloatAttribute
in interfaceTypedXMLStreamWriter
- Throws:
XMLStreamException
-
writeDoubleAttribute
public void writeDoubleAttribute(String prefix, String nsURI, String localName, double value) throws XMLStreamException - Specified by:
writeDoubleAttribute
in interfaceTypedXMLStreamWriter
- Throws:
XMLStreamException
-
writeIntegerAttribute
public void writeIntegerAttribute(String prefix, String nsURI, String localName, BigInteger value) throws XMLStreamException - Specified by:
writeIntegerAttribute
in interfaceTypedXMLStreamWriter
- Throws:
XMLStreamException
-
writeDecimalAttribute
public void writeDecimalAttribute(String prefix, String nsURI, String localName, BigDecimal value) throws XMLStreamException - Specified by:
writeDecimalAttribute
in interfaceTypedXMLStreamWriter
- Throws:
XMLStreamException
-
writeQNameAttribute
public void writeQNameAttribute(String prefix, String nsURI, String localName, QName name) throws XMLStreamException - Specified by:
writeQNameAttribute
in interfaceTypedXMLStreamWriter
- Throws:
XMLStreamException
-
writeIntArrayAttribute
public void writeIntArrayAttribute(String prefix, String nsURI, String localName, int[] value) throws XMLStreamException Description copied from interface:TypedXMLStreamWriter
Write int array attribute. The lexical representation of a int array is defined by the following XML schema type:
<xs:simpleType name="intArray"> <xs:list itemType="xs:int"/> </xs:simpleType>
whose lexical space is a list of space-separated ints.- Specified by:
writeIntArrayAttribute
in interfaceTypedXMLStreamWriter
- Parameters:
prefix
- The attribute's prefix.nsURI
- The attribute's URI.localName
- The attribute's local name.value
- The array from which to write the ints.- Throws:
XMLStreamException
-
writeLongArrayAttribute
public void writeLongArrayAttribute(String prefix, String nsURI, String localName, long[] value) throws XMLStreamException - Specified by:
writeLongArrayAttribute
in interfaceTypedXMLStreamWriter
- Throws:
XMLStreamException
-
writeFloatArrayAttribute
public void writeFloatArrayAttribute(String prefix, String nsURI, String localName, float[] value) throws XMLStreamException - Specified by:
writeFloatArrayAttribute
in interfaceTypedXMLStreamWriter
- Throws:
XMLStreamException
-
writeDoubleArrayAttribute
public void writeDoubleArrayAttribute(String prefix, String nsURI, String localName, double[] value) throws XMLStreamException - Specified by:
writeDoubleArrayAttribute
in interfaceTypedXMLStreamWriter
- Throws:
XMLStreamException
-
writeBinaryAttribute
public void writeBinaryAttribute(String prefix, String nsURI, String localName, byte[] value) throws XMLStreamException Description copied from interface:TypedXMLStreamWriter
Write a byte array attribute. The lexical representation of a byte array is defined by the XML Schema base64Binary data type.
Note: base64 variant defaults to
Base64Variants.MIME
.- Specified by:
writeBinaryAttribute
in interfaceTypedXMLStreamWriter
- Parameters:
prefix
- The attribute's prefix.nsURI
- The attribute's URI.localName
- The attribute's local name.value
- The array from which to write the bytes.- Throws:
XMLStreamException
-
writeBinaryAttribute
public void writeBinaryAttribute(Base64Variant v, String prefix, String nsURI, String localName, byte[] value) throws XMLStreamException - Specified by:
writeBinaryAttribute
in interfaceTypedXMLStreamWriter
- Throws:
XMLStreamException
-
isPropertySupported
Description copied from interface:XMLStreamWriter2
Method similar toXMLOutputFactory.isPropertySupported(java.lang.String)
, used to determine whether a property is supported by the Writer instance. This means that this method may return false for some properties that the output factory does support: specifically, it should only return true if the value is mutable on per-instance basis. False means that either the property is not recognized, or is not mutable via writer instance.- Specified by:
isPropertySupported
in interfaceXMLStreamWriter2
-
setProperty
Description copied from interface:XMLStreamWriter2
Method that can be used to set per-writer properties; a subset of properties one can set via matchingXMLOutputFactory2
instance. Exactly which methods are mutable is implementation specific.- Specified by:
setProperty
in interfaceXMLStreamWriter2
- Parameters:
name
- Name of the property to setvalue
- Value to set property to.- Returns:
- True, if the specified property was succesfully set to specified value; false if its value was not changed
-
getLocation
Description copied from interface:XMLStreamWriter2
Method that should return current output location, if the writer keeps track of it; null if it does not.- Specified by:
getLocation
in interfaceXMLStreamWriter2
-
getEncoding
Description copied from interface:XMLStreamWriter2
Method that can be called to get information about encoding that this writer is using (or at least claims is using). That is, it returns name of encoding specified when (in order of priority):- Passed to one of factory methods of
XMLOutputFactory
- Passed to
writeStartDocument
method (explicitly or implicity; latter in cases where defaults are imposed by Stax specification)
- Specified by:
getEncoding
in interfaceXMLStreamWriter2
- Passed to one of factory methods of
-
writeCData
- Specified by:
writeCData
in interfaceXMLStreamWriter2
- Throws:
XMLStreamException
-
writeDTD
public void writeDTD(String rootName, String systemId, String publicId, String internalSubset) throws XMLStreamException - Specified by:
writeDTD
in interfaceXMLStreamWriter2
- Throws:
XMLStreamException
-
writeFullEndElement
Description copied from interface:XMLStreamWriter2
Method similar toXMLStreamWriter.writeEndElement()
, but that will always write the full end element, instead of empty element. This only matters for cases where the element itself has no content, and if writer is allowed to write empty elements when it encounters such start/end element write pairs.- Specified by:
writeFullEndElement
in interfaceXMLStreamWriter2
- Throws:
XMLStreamException
-
writeSpace
Description copied from interface:XMLStreamWriter2
Method that can be called to write whitespace-only content. If so, it is to be written as is (with no escaping), and does not contain non-whitespace characters (writer may validate this, and throw an exception if it does).This method is useful for things like outputting indentation.
- Specified by:
writeSpace
in interfaceXMLStreamWriter2
- Throws:
XMLStreamException
-
writeSpace
Description copied from interface:XMLStreamWriter2
Method that can be called to write whitespace-only content. If so, it is to be written as is (with no escaping), and does not contain non-whitespace characters (writer may validate this, and throw an exception if it does).This method is useful for things like outputting indentation.
- Specified by:
writeSpace
in interfaceXMLStreamWriter2
- Throws:
XMLStreamException
-
writeStartDocument
public void writeStartDocument(String version, String encoding, boolean standAlone) throws XMLStreamException - Specified by:
writeStartDocument
in interfaceXMLStreamWriter2
- Throws:
XMLStreamException
-
writeRaw
Description copied from interface:XMLStreamWriter2
Method that writes specified content as is, without encoding or deciphering it in any way. It will not update state of the writer (except by possibly flushing output of previous writes, like finishing a start element), nor be validated in any way. As such, care must be taken, if this method is used.Method is usually used when encapsulating output from another writer as a sub-tree, or when passing through XML fragments.
NOTE: since text to be written may be anything, including markup, it can not be reliably validated. Because of this, validator(s) attached to the writer will NOT be informed about writes.
- Specified by:
writeRaw
in interfaceXMLStreamWriter2
- Throws:
XMLStreamException
-
writeRaw
Description copied from interface:XMLStreamWriter2
Method that writes specified content as is, without encoding or deciphering it in any way. It will not update state of the writer (except by possibly flushing output of previous writes, like finishing a start element), nor be validated in any way. As such, care must be taken, if this method is used.Method is usually used when encapsulating output from another writer as a sub-tree, or when passing through XML fragments.
NOTE: since text to be written may be anything, including markup, it can not be reliably validated. Because of this, validator(s) attached to the writer will NOT be informed about writes.
- Specified by:
writeRaw
in interfaceXMLStreamWriter2
- Throws:
XMLStreamException
-
writeRaw
Description copied from interface:XMLStreamWriter2
Method that writes specified content as is, without encoding or deciphering it in any way. It will not update state of the writer (except by possibly flushing output of previous writes, like finishing a start element), nor be validated in any way. As such, care must be taken, if this method is used.Method is usually used when encapsulating output from another writer as a sub-tree, or when passing through XML fragments.
NOTE: since text to be written may be anything, including markup, it can not be reliably validated. Because of this, validator(s) attached to the writer will NOT be informed about writes.
- Specified by:
writeRaw
in interfaceXMLStreamWriter2
- Throws:
XMLStreamException
-
copyEventFromReader
public void copyEventFromReader(XMLStreamReader2 sr, boolean preserveEventData) throws XMLStreamException Description copied from interface:XMLStreamWriter2
Method that essentially copies event that the specified reader has just read. This can be both more convenient (no need to worry about details) and more efficient than separately calling access methods of the reader and write methods of the writer, since writer may know more about reader than the application (and may be able to use non-public methods)- Specified by:
copyEventFromReader
in interfaceXMLStreamWriter2
- Parameters:
sr
- Reader to use for accessing event to copypreserveEventData
- If true, writer is not allowed to change the state of the reader (so that all the data associated with the current event has to be preserved); if false, writer is allowed to use methods that may cause some data to be discarded. Setting this to false may improve the performance, since it may allow full no-copy streaming of data, especially textual contents.- Throws:
XMLStreamException
-
closeCompletely
Description copied from interface:XMLStreamWriter2
Method similar toXMLStreamWriter.close()
, except that this method also does close the underlying output destination (stream) if it has not yet been closed. It is specifically necessary to call this method if the parsing ends in an exception to ensure that the output destination does get properly closed, even if the stream writer would otherwise close it (as is the case for destinations it manages where calling application has no access)- Specified by:
closeCompletely
in interfaceXMLStreamWriter2
- Throws:
XMLStreamException
-
validateAgainst
Description copied from interface:Validatable
Method that will construct aXMLValidator
instance from the given schema (unless a validator for that schema has already been added), initialize it if necessary, and make validatable object (reader, writer) call appropriate validation methods from this point on until the end of the document (that is, it's not scoped with sub-trees), or until validator is removed by an explicit call toValidatable.stopValidatingAgainst(org.codehaus.stax2.validation.XMLValidationSchema)
.Note that while this method can be called at any point in output processing, validator instances are not required to be able to handle addition at other points than right before outputting the root element.
- Specified by:
validateAgainst
in interfaceValidatable
- Returns:
- Validator instance constructed, if validator was added, or null if a validator for the schema has already been constructed.
- Throws:
XMLStreamException
-
stopValidatingAgainst
Description copied from interface:Validatable
Method that can be called by application to stop validating output against a schema, for whichValidatable.validateAgainst(org.codehaus.stax2.validation.XMLValidationSchema)
was called earlier.- Specified by:
stopValidatingAgainst
in interfaceValidatable
- Returns:
- Validator instance created from the schema that was removed, if one was in use; null if no such schema in use.
- Throws:
XMLStreamException
-
stopValidatingAgainst
Description copied from interface:Validatable
Method that can be called by application to stop validating output using specified validator. The validator passed should be an earlier return value for a call toValidatable.validateAgainst(org.codehaus.stax2.validation.XMLValidationSchema)
.Note: the specified validator is compared for identity with validators in use, not for equality.
- Specified by:
stopValidatingAgainst
in interfaceValidatable
- Returns:
- Validator instance found (ie. argument
validator
) if it was being used for validating current document; null if not. - Throws:
XMLStreamException
-
setValidationProblemHandler
Description copied from interface:Validatable
Method that application can call to define a custom handler for validation problems encountered during validation process.- Specified by:
setValidationProblemHandler
in interfaceValidatable
- Parameters:
h
- Handler to install, if non null; if null, indicates that the default (implementation-specific) handling should be used- Returns:
- Previously set validation problem handler, if any; null if none was set
-
copyStartElement
- Throws:
XMLStreamException
-
serializeQNameValue
Method called to serialize given qualified name into valid String serialization, taking into account existing namespace bindings.- Throws:
XMLStreamException
-
getValueEncoder
-