Top Description Fields Constructors Methods
org.codehaus.stax2.ri.dom

public abstract Class DOMWrappingReader

extends Object
implements XMLStreamReader2, AttributeInfo, DTDInfo, LocationInfo, NamespaceContext, XMLStreamConstants
Class Inheritance
All Implemented Interfaces
javax.xml.stream.XMLStreamConstants, javax.xml.namespace.NamespaceContext, org.codehaus.stax2.LocationInfo, org.codehaus.stax2.DTDInfo, org.codehaus.stax2.AttributeInfo, org.codehaus.stax2.XMLStreamReader2, org.codehaus.stax2.validation.Validatable, org.codehaus.stax2.typed.TypedXMLStreamReader, javax.xml.stream.XMLStreamReader
Imports
java.io.IOException, .Writer, java.math.BigDecimal, .BigInteger, java.util.*, javax.xml.transform.dom.DOMSource, javax.xml.namespace.NamespaceContext, .QName, javax.xml.stream.*, org.w3c.dom.*, org.codehaus.stax2.AttributeInfo, .DTDInfo, .LocationInfo, .XMLStreamLocation2, .XMLStreamReader2, org.codehaus.stax2.ri.EmptyIterator, .EmptyNamespaceContext, .SingletonIterator, .Stax2Util, org.codehaus.stax2.ri.typed.StringBase64Decoder, .ValueDecoderFactory, org.codehaus.stax2.typed.Base64Variant, .Base64Variants, .TypedArrayDecoder, .TypedValueDecoder, .TypedXMLStreamException, org.codehaus.stax2.validation.DTDValidationSchema, .ValidationProblemHandler, .XMLValidationSchema, .XMLValidator

This is an adapter class that presents a DOM document as if it was a regular XMLStreamReader. This is mostly useful for inter-operability purposes, and should only be used when the input has to come as a DOM object and the original xml content is not available as a stream.

Note that the implementation is only to be used for use with javax.xml.transform.dom.DOMSource. It can however be used for both full documents, and single element root fragments, depending on what node is passed as the argument.

Some notes regarding missing/incomplete functionality:

Field Summary

Modifier and TypeField and Description
protected List<Node>
_attrList

Lazily instantiated List of all actual attributes for the current (start) element, NOT including namespace declarations.

protected StringBase64Decoder
_base64Decoder

Lazily-constructed decoder object for decoding base64 encoded binary content.

protected boolean
_cfgInternNames

By default we do not force interning of names: can be reset by sub-classes.

protected boolean
_cfgInternNsURIs

By default we do not force interning of namespace URIs: can be reset by sub-classes.

protected final boolean
_cfgNsAware

Whether stream reader is to be namespace aware (as per property XMLInputFactory#IS_NAMESPACE_AWARE) or not

protected String
_coalescedText

In coalescing mode, we may need to combine textual content from multiple adjacent nodes.

protected final boolean
_coalescing

Whether stream reader is to coalesce adjacent textual (CHARACTERS, SPACE, CDATA) events (as per property XMLInputFactory#IS_COALESCING) or not

protected int
protected Node
_currNode

Current node is the DOM node that contains information regarding the current event.

protected ValueDecoderFactory
_decoderFactory

Factory used for constructing decoders we need for typed access

protected int
protected List<String>
_nsDeclList

Lazily instantiated String pairs of all namespace declarations for the current (start/end) element.

protected final Node
protected final String
protected Stax2Util.TextBuffer
_textBuffer

Helper object used for combining segments of text as needed

protected static final int
protected static final int
ERR_STATE_NOT_ELEM

Current state not START_ELEMENT or END_ELEMENT, should be

protected static final int
ERR_STATE_NOT_PI

Current state not PROCESSING_INSTRUCTION

protected static final int
ERR_STATE_NOT_START_ELEM

Current state not START_ELEMENT, should be

protected static final int
ERR_STATE_NOT_TEXTUAL

Current state not one where getText() can be used

protected static final int
protected static final int
ERR_STATE_NOT_TEXTUAL_XXX

Current state not one where getTextXxx() can be used

protected static final int
private static final int
private static final int
private static final int
protected static final int

Constructor Summary

AccessConstructor and Description
protected
DOMWrappingReader(DOMSource
Node that is the tree of the DOM document, or fragment.
src
,
boolean
Whether resulting reader should operate in namespace aware mode or not. Note that this should be compatible with settings for the DOM builder that produced DOM tree or fragment being operated on, otherwise results are not defined.
nsAware
,
boolean
Whether resulting reader should coalesce adjacent text events or not
coalescing
)

Method Summary

Modifier and TypeMethod and Description
protected StringBase64Decoder
private void
_calcNsAndAttrLists(boolean
Whether to include actual attributes too, or just namespace declarations
attrsToo
)

private QName
protected TypedXMLStreamException
_constructTypeException(IllegalArgumentException
Problem as reported by converter
iae
,
String
Lexical value (element content, attribute value) that could not be converted succesfully.
lexicalValue
)

Method called to wrap or convert given conversion-fail exception into a full TypedXMLStreamException,

protected TypedXMLStreamException
protected ValueDecoderFactory
protected int
protected String
_internName(String name)

Method called to do additional intern()ing for a name, if and as necessary

protected String
private String
_safeGetLocalName(Node n)

Due to differences in how namespace-aware and non-namespace modes work in DOM, different methods are needed.

private final boolean
checkExpand(TypedArrayDecoder tad)

Internal method used to see if we can expand the buffer that the array decoder has.

public void
close()

Implements javax.xml.stream.XMLStreamReader.close.

Note

as per StAX 1.0 specs, this method does NOT close the underlying input reader.

public void
closeCompletely()

Implements org.codehaus.stax2.XMLStreamReader2.closeCompletely.

Method similar to javax.xml.stream.XMLStreamReader#close, except that this method also does close the underlying input source if it has not yet been closed.
protected void
coalesceText(int initialType)

private String
public int
protected String
findErrorDesc(int errorType, int currEvent)

Method used to locate error message description to use.

public final void
getAttributeAs(int index, TypedValueDecoder tvd)

Implements org.codehaus.stax2.typed.TypedXMLStreamReader.getAttributeAs.

Generic access method that can be used for efficient decoding of additional types not support natively by the typed stream reader.
public int
getAttributeAsArray(int index, TypedArrayDecoder tad)

Implements org.codehaus.stax2.typed.TypedXMLStreamReader.getAttributeAsArray.

Method that allows reading contents of an attribute as an array of whitespace-separate tokens, decoded using specified decoder.
public byte[]
getAttributeAsBinary(int
The attribute's index as returned by getAttributeIndex(String, String).
index
)

Implements org.codehaus.stax2.typed.TypedXMLStreamReader.getAttributeAsBinary.

Read an attribute value as a byte array.
public byte[]
public boolean
getAttributeAsBoolean(int
The attribute's index as returned by getAttributeIndex(String, String)
index
)

Implements org.codehaus.stax2.typed.TypedXMLStreamReader.getAttributeAsBoolean.

Read an attribute value as a boolean.

public BigDecimal
public double
public double[]
public float
public float[]
public int
getAttributeAsInt(int
The attribute's index as returned by getAttributeIndex(String, String)
index
)

Implements org.codehaus.stax2.typed.TypedXMLStreamReader.getAttributeAsInt.

Read an attribute value as a boolean.

public int[]
getAttributeAsIntArray(int
The attribute's index as returned by getAttributeIndex(String, String).
index
)

Implements org.codehaus.stax2.typed.TypedXMLStreamReader.getAttributeAsIntArray.

Read an attribute content as an int array.

public BigInteger
public long
getAttributeAsLong(int
The attribute's index as returned by getAttributeIndex(String, String)
index
)

Implements org.codehaus.stax2.typed.TypedXMLStreamReader.getAttributeAsLong.

Read an attribute value as a boolean.

public long[]
public QName
public int
getAttributeCount()

Implements javax.xml.stream.XMLStreamReader.getAttributeCount, org.codehaus.stax2.AttributeInfo.getAttributeCount.

Returns the count of attributes on this START_ELEMENT, this method is only valid on a START_ELEMENT or ATTRIBUTE.
public int
getAttributeIndex(String
The attribute's namespace URI. Values of null and "" are considered the same, i.e. "no namespace" (or "empty" namespace)
namespaceURI
,
String
The attribute's local name.
localName
)

Implements org.codehaus.stax2.typed.TypedXMLStreamReader.getAttributeIndex.

Returns the index of the attribute whose local name is localName and URI is namespaceURI or -1 if no such attribute exists.
public AttributeInfo
getAttributeInfo()

Implements org.codehaus.stax2.XMLStreamReader2.getAttributeInfo.

Method that can be called to get additional information about attributes related to the current start element, as well as related DTD-based information if available.
public String
getAttributeLocalName(int
the position of the attribute
index
)

Implements javax.xml.stream.XMLStreamReader.getAttributeLocalName.

Returns the localName of the attribute at the provided index
public QName
getAttributeName(int
the position of the attribute
index
)

Implements javax.xml.stream.XMLStreamReader.getAttributeName.

Returns the qname of the attribute at the provided index
public String
getAttributeNamespace(int
the position of the attribute
index
)

Implements javax.xml.stream.XMLStreamReader.getAttributeNamespace.

Returns the namespace of the attribute at the provided index
public String
getAttributePrefix(int
the position of the attribute
index
)

Implements javax.xml.stream.XMLStreamReader.getAttributePrefix.

Returns the prefix of this attribute at the provided index
public String
getAttributeType(int
the position of the attribute
index
)

Implements javax.xml.stream.XMLStreamReader.getAttributeType.

Returns the XML type of the attribute at the provided index
public String
getAttributeValue(int
the position of the attribute
index
)

Implements javax.xml.stream.XMLStreamReader.getAttributeValue.

Returns the value of the attribute at the index
public String
getAttributeValue(String
the namespace of the attribute
nsURI
,
String
the local name of the attribute, cannot be null
localName
)

Implements javax.xml.stream.XMLStreamReader.getAttributeValue.

Returns the normalized attribute value of the attribute with the namespace and localName If the namespaceURI is null the namespace is not checked for equality
public String
getCharacterEncodingScheme()

Implements javax.xml.stream.XMLStreamReader.getCharacterEncodingScheme.

As per Stax (1.0) specs, needs to return whatever xml declaration claimed encoding is, if any; or null if no xml declaration found.
public XMLStreamLocation2
getCurrentLocation()

Implements org.codehaus.stax2.LocationInfo.getCurrentLocation.

A method that returns the current location of the stream reader at the input source.
public int

Returns:

Number of open elements in the stack; 0 when parser is in prolog/epilog, 1 inside root element and so on.
getDepth
()

Implements org.codehaus.stax2.XMLStreamReader2.getDepth.

Method that returns the number of open elements in the stack; 0 when the reader is in prolog/epilog, 1 inside root element (including when pointing at the root element itself) and so on.
public DTDInfo
getDTDInfo()

Implements org.codehaus.stax2.XMLStreamReader2.getDTDInfo.

Since this class implements DTDInfo, method can just return this.
public String

Returns:

Internal subset portion of the DOCTYPE declaration, if any; empty String if none
getDTDInternalSubset
()

Implements org.codehaus.stax2.DTDInfo.getDTDInternalSubset.

public String
public String
public String
public void
getElementAs(TypedValueDecoder tvd)

Implements org.codehaus.stax2.typed.TypedXMLStreamReader.getElementAs.

Generic decoding method that can be used for efficient decoding of additional types not support natively by the typed stream reader.
public byte[]
getElementAsBinary()

Implements org.codehaus.stax2.typed.TypedXMLStreamReader.getElementAsBinary.

Convenience method that can be used similar to read binary content instead of readElementAsBinary, in cases where neither performance nor memory usage is a big concern.
public byte[]
getElementAsBinary(Base64Variant
Base64 variant content is in; needed to decode alternative variants ("modified base64")
v
)

Implements org.codehaus.stax2.typed.TypedXMLStreamReader.getElementAsBinary.

Convenience method that can be used similar to read binary content instead of readElementAsBinary, in cases where neither performance nor memory usage is a big concern.
public boolean
public BigDecimal
public double
getElementAsDouble()

Implements org.codehaus.stax2.typed.TypedXMLStreamReader.getElementAsDouble.

Read an element content as a 64-bit floating point value.

public float
getElementAsFloat()

Implements org.codehaus.stax2.typed.TypedXMLStreamReader.getElementAsFloat.

Read an element content as a 32-bit floating point value.

public int
getElementAsInt()

Implements org.codehaus.stax2.typed.TypedXMLStreamReader.getElementAsInt.

Read an element content as a 32-bit integer.

public BigInteger
public long
getElementAsLong()

Implements org.codehaus.stax2.typed.TypedXMLStreamReader.getElementAsLong.

Read an element content as a 64-bit integer.

public QName
public String
getElementText()

Implements javax.xml.stream.XMLStreamReader.getElementText.

From StAX specs:
Reads the content of a text-only element, an exception is thrown if this is not a text-only element. Regardless of value of javax.xml.stream.isCoalescing this method always returns coalesced content. Precondition: the current event is START_ELEMENT. Postcondition: the current event is the corresponding END_ELEMENT.
public String
getEncoding()

Implements javax.xml.stream.XMLStreamReader.getEncoding.

As per Stax (1.0) specs, needs to return whatever parser determined the encoding was, if it was able to figure it out.
public long
getEndingByteOffset()

Implements org.codehaus.stax2.LocationInfo.getEndingByteOffset.

Method that can be used to get exact byte offset (number of bytes read from the stream right before getting to this location) in the stream that is pointed to by this reader, right after the end of the current event.
public long
getEndingCharOffset()

Implements org.codehaus.stax2.LocationInfo.getEndingCharOffset.

Method that can be used to get exact character offset (number of chars read from the stream right before getting to this location) in the stream that is pointed to by this reader, right after the end of the current event.
public final XMLStreamLocation2
getEndLocation()

Implements org.codehaus.stax2.LocationInfo.getEndLocation.

An optional method that either returns the location object that points the ending position of the current event, or null if implementation does not keep track of it (some may return only start location; and some no location at all).
protected Location
public int
getEventType()

Implements javax.xml.stream.XMLStreamReader.getEventType.

Returns type of the last event returned; or START_DOCUMENT before any events has been explicitly returned.
public Object
getFeature(String
Name of the feature of which value to get
name
)

Implements org.codehaus.stax2.XMLStreamReader2.getFeature.

Deprecated
Method that can be used to get per-reader values; both generic ones (names for which are defined as constants in this class), and implementation dependant ones.
public int
getIdAttributeIndex()

Implements org.codehaus.stax2.AttributeInfo.getIdAttributeIndex.

Returns the index of the id attribute (attribute with any name, type ID from DTD) of current (start) element, if any.
public String
getLocalName()

Implements javax.xml.stream.XMLStreamReader.getLocalName.

Returns the (local) name of the current event.
public final Location
public final LocationInfo
getLocationInfo()

Implements org.codehaus.stax2.XMLStreamReader2.getLocationInfo.

Location information is always accessible, for this reader.
public QName
getName()

Implements javax.xml.stream.XMLStreamReader.getName.

Returns a QName for the current START_ELEMENT or END_ELEMENT event
public NamespaceContext
getNamespaceContext()

Implements javax.xml.stream.XMLStreamReader.getNamespaceContext.

Returns a read only namespace context for the current position.
public int
getNamespaceCount()

Implements javax.xml.stream.XMLStreamReader.getNamespaceCount.

Returns the count of namespaces declared on this START_ELEMENT or END_ELEMENT, this method is only valid on a START_ELEMENT, END_ELEMENT or NAMESPACE.
public String
getNamespacePrefix(int
the position of the namespace declaration
index
)

Implements javax.xml.stream.XMLStreamReader.getNamespacePrefix.

Alas, DOM does not expose any of information necessary for determining actual declarations.
public String
getNamespaceURI()

Implements javax.xml.stream.XMLStreamReader.getNamespaceURI.

If the current event is a START_ELEMENT or END_ELEMENT this method returns the URI of the prefix or the default namespace.
public String
getNamespaceURI(int
the position of the namespace declaration
index
)

Implements javax.xml.stream.XMLStreamReader.getNamespaceURI.

Returns the uri for the namespace declared at the index.
public String
getNamespaceURI(String
prefix to look up
prefix
)

Implements javax.xml.stream.XMLStreamReader.getNamespaceURI, javax.xml.namespace.NamespaceContext.getNamespaceURI.

Get Namespace URI bound to a prefix in the current scope.
public NamespaceContext
getNonTransientNamespaceContext()

Implements org.codehaus.stax2.XMLStreamReader2.getNonTransientNamespaceContext.

This method returns a namespace context object that contains information identical to that returned by javax.xml.stream.XMLStreamReader#getNamespaceContext(), but one that is not transient.
public int
getNotationAttributeIndex()

Implements org.codehaus.stax2.AttributeInfo.getNotationAttributeIndex.

Returns the index of the notation attribute (attribute with any name, type NOTATION from DTD) of current (start) element, if any.
public String
getPIData()

Implements javax.xml.stream.XMLStreamReader.getPIData.

Get the data section of a processing instruction
public String
getPITarget()

Implements javax.xml.stream.XMLStreamReader.getPITarget.

Get the target of a processing instruction
public String
getPrefix()

Implements javax.xml.stream.XMLStreamReader.getPrefix.

Returns the prefix of the current event or null if the event does not have a prefix
public String
getPrefix(String
URI of Namespace to lookup
namespaceURI
)

Implements javax.xml.namespace.NamespaceContext.getPrefix.

Get prefix bound to Namespace URI in the current scope.
public String
getPrefixedName()

Implements org.codehaus.stax2.XMLStreamReader2.getPrefixedName.

This method returns "prefix-qualified" name of the current element.
public Iterator<String>
getPrefixes(String
URI of Namespace to lookup
namespaceURI
)

Implements javax.xml.namespace.NamespaceContext.getPrefixes.

Get all prefixes bound to a Namespace URI in the current scope.
public Object
public DTDValidationSchema
public abstract Object
getProperty(String
The name of the property, may not be null
name
)

Redeclares javax.xml.stream.XMLStreamReader.getProperty.

Get the value of a feature/property from the underlying implementation
public long
getStartingByteOffset()

Implements org.codehaus.stax2.LocationInfo.getStartingByteOffset.

Method that can be used to get exact byte offset (number of bytes read from the stream right before getting to this location) in the stream that is pointed to by this reader, right before the start of the current event.
public long
getStartingCharOffset()

Implements org.codehaus.stax2.LocationInfo.getStartingCharOffset.

Method that can be used to get exact character offset (number of chars read from the stream right before getting to this location) in the stream that is pointed to by this reader, right before the start of the current event.
public XMLStreamLocation2
getStartLocation()

Implements org.codehaus.stax2.LocationInfo.getStartLocation.

An optional method that either returns the location object that points the starting position of the current event, or null if implementation does not keep track of it (some may return only end location; and some no location at all).
public String
getText()

Implements javax.xml.stream.XMLStreamReader.getText.

Returns the current value of the parse event as a string, this returns the string value of a CHARACTERS event, returns the value of a COMMENT, the replacement value for an ENTITY_REFERENCE, the string value of a CDATA section, the string value for a SPACE event, or the String value of the internal subset of the DTD.
public int

Returns:

Number of characters written to the reader
getText
(Writer
Writer to use for writing textual contents
w
,
boolean
If true, reader has to preserve contents so that further calls to getText will return proper conntets. If false, reader is allowed to skip creation of such copies: this can improve performance, but it also means that further calls to getText is not guaranteed to return meaningful data.
preserveContents
)

Implements org.codehaus.stax2.XMLStreamReader2.getText.

Method similar to getText(), except that it just uses provided Writer to write all textual content.
public char[]
getTextCharacters()

Implements javax.xml.stream.XMLStreamReader.getTextCharacters.

Returns an array which contains the characters from this event.
public int
getTextCharacters(int
the index of the first character in the source array to copy
sourceStart
,
char[]
the destination array
target
,
int
the start offset in the target array
targetStart
,
int
the number of characters to copy
len
)

Implements javax.xml.stream.XMLStreamReader.getTextCharacters.

Gets the text associated with a CHARACTERS, SPACE or CDATA event.
public int
getTextLength()

Implements javax.xml.stream.XMLStreamReader.getTextLength.

Returns the length of the sequence of characters for this Text event within the text character array.
public int
getTextStart()

Implements javax.xml.stream.XMLStreamReader.getTextStart.

Returns the offset into the text character array where the first character (of this text event) is stored.
public String
getVersion()

Implements javax.xml.stream.XMLStreamReader.getVersion.

Get the xml version declared on the xml declaration Returns null if none was declared
private void
private void
public boolean
hasName()

Implements javax.xml.stream.XMLStreamReader.hasName.

returns a boolean indicating whether the current event has a name (is a START_ELEMENT or END_ELEMENT).
public boolean
hasNext()

Implements javax.xml.stream.XMLStreamReader.hasNext.

Returns true if there are more parsing events and false if there are no more events.
public boolean
hasText()

Implements javax.xml.stream.XMLStreamReader.hasText.

Return a boolean indicating whether the current event has text.
public boolean
isAttributeSpecified(int
the position of the attribute
index
)

Implements javax.xml.stream.XMLStreamReader.isAttributeSpecified.

Returns a boolean which indicates if this attribute was created by default
public boolean
isCharacters()

Implements javax.xml.stream.XMLStreamReader.isCharacters.

Returns true if the cursor points to a character data event
public boolean

Returns:

True, if cursor points to a start or end element that is constructed from 'empty' element (ends with '/>'); false otherwise.
isEmptyElement
()

Implements org.codehaus.stax2.XMLStreamReader2.isEmptyElement.

Method that can be used to check whether current START_ELEMENT event was created for an empty element (xml short-hand notation where one tag implies start and end, ending with "/>"), or not.
public boolean
isEndElement()

Implements javax.xml.stream.XMLStreamReader.isEndElement.

Returns true if the cursor points to an end tag (otherwise false)
public abstract boolean
isPropertySupported(String name)

Redeclares org.codehaus.stax2.XMLStreamReader2.isPropertySupported.

Method similar to javax.xml.stream.XMLInputFactory#isPropertySupported, used to determine whether a property is supported by the Reader instance.
public boolean
isStandalone()

Implements javax.xml.stream.XMLStreamReader.isStandalone.

Get the standalone declaration from the xml declaration
public boolean
isStartElement()

Implements javax.xml.stream.XMLStreamReader.isStartElement.

Returns true if the cursor points to a start tag (otherwise false)
public boolean
isWhiteSpace()

Implements javax.xml.stream.XMLStreamReader.isWhiteSpace.

Returns true if the cursor points to a character data event that consists of all whitespace
public int
next()

Implements javax.xml.stream.XMLStreamReader.next.

Get next parsing event - a processor may return all contiguous character data in a single chunk, or it may split it into several chunks.
public int
nextTag()

Implements javax.xml.stream.XMLStreamReader.nextTag.

Skips any white space (isWhiteSpace() returns true), COMMENT, or PROCESSING_INSTRUCTION, until a START_ELEMENT or END_ELEMENT is reached.
public int
readElementAsArray(TypedArrayDecoder tad)

Implements org.codehaus.stax2.typed.TypedXMLStreamReader.readElementAsArray.

Read an element content as an array of tokens.
public int
readElementAsBinary(byte[] resultBuffer, int offset, int maxLength)

Implements org.codehaus.stax2.typed.TypedXMLStreamReader.readElementAsBinary.

public int
readElementAsBinary(byte[]
Array in which to copy decoded bytes.
resultBuffer
,
int
Starting offset of the first decoded byte within result buffer
offset
,
int
Maximum number of bytes to decode with this call
maxLength
,
Base64Variant v)

Implements org.codehaus.stax2.typed.TypedXMLStreamReader.readElementAsBinary.

Read element content as decoded byte sequence; possibly only reading a fragment of all element content.
public int
public int
public int
readElementAsIntArray(int[]
The array in which to copy the ints.
value
,
int
The index in the array from which copying starts.
from
,
int
The maximun number of ints to copy. Minimum value is 1; others an IllegalArgumentException is thrown
length
)

Implements org.codehaus.stax2.typed.TypedXMLStreamReader.readElementAsIntArray.

Read an element content as an int array.
public int
protected void
reportParseProblem(int errorType)

protected void
reportWrongState(int errorType)

public void
require(int
the event type
type
,
String
the uri of the event, may be null
nsUri
,
String
the localName of the event, may be null
localName
)

Implements javax.xml.stream.XMLStreamReader.require.

Test if the current event is of the given type and if the namespace and name match the current namespace and name of the current event.
public void
setFeature(String
Name of the feature to set
name
,
Object
Value to set feature to.
value
)

Implements org.codehaus.stax2.XMLStreamReader2.setFeature.

Deprecated
Method that can be used to set per-reader features such as configuration settings; both generic ones (names for which are defined as constants in this class), and implementation dependant ones.
protected void
setInternNames(boolean state)

protected void
setInternNsURIs(boolean state)

public abstract boolean

Returns:

True, if the specified property was succesfully set to specified value; false if its value was not changed
setProperty
(String
Name of the property to set
name
,
Object
Value to set property to.
value
)

Redeclares org.codehaus.stax2.XMLStreamReader2.setProperty.

Method that can be used to set per-reader properties; a subset of properties one can set via matching org.codehaus.stax2.XMLInputFactory2 instance.
public ValidationProblemHandler
setValidationProblemHandler(ValidationProblemHandler
Handler to install, if non null; if null, indicates that the default (implementation-specific) handling should be used
h
)

Implements org.codehaus.stax2.validation.Validatable.setValidationProblemHandler.

Method that application can call to define a custom handler for validation problems encountered during validation process.
public void
skipElement()

Implements org.codehaus.stax2.XMLStreamReader2.skipElement.

Method that will skip all the contents of the element that the stream currently points to.
public boolean
standaloneSet()

Implements javax.xml.stream.XMLStreamReader.standaloneSet.

Checks if standalone was set in the document
public XMLValidator
stopValidatingAgainst(XMLValidationSchema schema)

Implements org.codehaus.stax2.validation.Validatable.stopValidatingAgainst.

Method that can be called by application to stop validating output against a schema, for which validateAgainst was called earlier.
public XMLValidator
stopValidatingAgainst(XMLValidator validator)

Implements org.codehaus.stax2.validation.Validatable.stopValidatingAgainst.

Method that can be called by application to stop validating output using specified validator.
protected abstract void
protected void
public XMLValidator
validateAgainst(XMLValidationSchema schema)

Implements org.codehaus.stax2.validation.Validatable.validateAgainst.

Method that will construct a XMLValidator 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 to stopValidatingAgainst.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait