java.lang.Object | |
↳ | org.springframework.util.xml.StaxUtils |
Convenience methods for working with the StAX API.
In particular, methods for using StAX (javax.xml.stream
) in combination with the TrAX API
(javax.xml.transform
), and converting StAX readers/writers into SAX readers/handlers and vice-versa.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create a SAX
ContentHandler that writes to the given StAX XMLStreamWriter . | |||||||||||
Create a SAX
ContentHandler that writes events to the given StAX XMLEventWriter . | |||||||||||
Create a custom, non-JAXP 1.4 StAX
Result for the given XMLEventWriter . | |||||||||||
Create a custom, non-JAXP 1.4 StAX
Result for the given XMLStreamWriter . | |||||||||||
Create a custom, non-JAXP 1.4 StAX
Source for the given XMLEventReader . | |||||||||||
Create a custom, non-JAXP 1.4 StAX
Source for the given XMLStreamReader . | |||||||||||
Return a
XMLStreamReader that reads from a XMLEventReader . | |||||||||||
Return a
XMLStreamWriter that writes to a XMLEventWriter . | |||||||||||
Create a StAX
Result for the given XMLStreamWriter . | |||||||||||
Create a StAX
Result for the given XMLEventWriter . | |||||||||||
Create a StAX
Source for the given XMLEventReader . | |||||||||||
Create a StAX
Source for the given XMLStreamReader . | |||||||||||
Create a SAX
XMLReader that reads from the given StAX XMLStreamReader . | |||||||||||
Create a SAX
XMLReader that reads from the given StAX XMLEventReader . | |||||||||||
Return the
XMLEventReader for the given StAX Source. | |||||||||||
Return the
XMLEventWriter for the given StAX Result. | |||||||||||
Return the
XMLStreamReader for the given StAX Source. | |||||||||||
Return the
XMLStreamWriter for the given StAX Result. | |||||||||||
Indicate whether the given
Result is a StAX Result. | |||||||||||
Indicate whether the given
Source is a StAX Source. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Create a SAX ContentHandler
that writes to the given StAX XMLStreamWriter
.
streamWriter | the StAX stream writer |
---|
streamWriter
Create a SAX ContentHandler
that writes events to the given StAX XMLEventWriter
.
eventWriter | the StAX event writer |
---|
eventWriter
Create a custom, non-JAXP 1.4 StAX Result
for the given XMLEventWriter
.
eventWriter | the StAX event writer |
---|
eventWriter
Create a custom, non-JAXP 1.4 StAX Result
for the given XMLStreamWriter
.
streamWriter | the StAX stream writer |
---|
streamWriter
Create a custom, non-JAXP 1.4 StAX Source
for the given XMLEventReader
.
eventReader | the StAX event reader |
---|
eventReader
Create a custom, non-JAXP 1.4 StAX Source
for the given XMLStreamReader
.
streamReader | the StAX stream reader |
---|
streamReader
Return a XMLStreamReader
that reads from a XMLEventReader
. Useful, because the StAX
XMLInputFactory
allows one to create a event reader from a stream reader, but not vice-versa.
XMLStreamException |
---|
Return a XMLStreamWriter
that writes to a XMLEventWriter
.
Create a StAX Result
for the given XMLStreamWriter
.
If JAXP 1.4 is available, this method returns a StAXResult; otherwise it returns a custom StAX Result.
streamWriter | the StAX stream writer |
---|
streamWriter
Create a StAX Result
for the given XMLEventWriter
.
If JAXP 1.4 is available, this method returns a StAXResult; otherwise it returns a custom StAX Result.
eventWriter | the StAX event writer |
---|
streamReader
XMLStreamException | in case of StAX errors |
---|
Create a StAX Source
for the given XMLEventReader
.
If JAXP 1.4 is available, this method returns a StAXSource; otherwise it returns a custom StAX Source.
eventReader | the StAX event reader |
---|
eventReader
XMLStreamException | in case of StAX errors |
---|
Create a StAX Source
for the given XMLStreamReader
.
If JAXP 1.4 is available, this method returns a StAXSource; otherwise it returns a custom StAX Source.
streamReader | the StAX stream reader |
---|
streamReader
Create a SAX XMLReader
that reads from the given StAX XMLStreamReader
.
streamReader | the StAX stream reader |
---|
streamWriter
Create a SAX XMLReader
that reads from the given StAX XMLEventReader
.
eventReader | the StAX event reader |
---|
eventWriter
Return the XMLEventReader
for the given StAX Source.
source | a custom StAX Source or
JAXP 1.4 StAXSource |
---|
XMLEventReader
IllegalArgumentException | if source is neither a custom StAX Source
nor a JAXP 1.4 StAXSource
|
---|
Return the XMLEventWriter
for the given StAX Result.
result | a custom StAX Result or
JAXP 1.4 StAXResult |
---|
XMLStreamReader
IllegalArgumentException | if source is neither a custom StAX Result
nor a JAXP 1.4 StAXResult
|
---|
Return the XMLStreamReader
for the given StAX Source.
source | a custom StAX Source or
JAXP 1.4 StAXSource |
---|
XMLStreamReader
IllegalArgumentException | if source is neither a custom StAX Source
nor JAXP 1.4 StAXSource
|
---|
Return the XMLStreamWriter
for the given StAX Result.
result | a custom StAX Result or
JAXP 1.4 StAXResult |
---|
XMLStreamReader
IllegalArgumentException | if source is neither a custom StAX Result
nor a JAXP 1.4 StAXResult
|
---|
Indicate whether the given Result
is a StAX Result.
true
if result
is a custom Stax Result or JAXP
1.4 StAXResult; false
otherwise.
Indicate whether the given Source
is a StAX Source.
true
if source
is a custom StAX source or JAXP
1.4 StAXSource; false
otherwise.