|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.xml.transform.sax.SAXSource
org.springframework.xml.transform.StaxSource
public class StaxSource
Implementation of the Source tagging interface for StAX readers. Can be constructed with a
XMLEventReader or a XMLStreamReader.
Source for StaxReaders in JAXP 1.3. There
will be a StaxSource in JAXP 1.4 (JDK 1.6), and by the time that version is available, this class will
probably be deprecated.
Even though StaxSource extends from SAXSource, calling the methods of
SAXSource is not supported. In general, the only supported operation on this class is
to use the XMLReader obtained via SAXSource.getXMLReader() to parse the input source obtained via SAXSource.getInputSource(). Calling setXMLReader(org.xml.sax.XMLReader) or setInputSource(org.xml.sax.InputSource) will result in UnsupportedOperationExceptions.
XMLEventReader,
XMLStreamReader,
Transformer| Field Summary |
|---|
| Fields inherited from class javax.xml.transform.sax.SAXSource |
|---|
FEATURE |
| Constructor Summary | |
|---|---|
StaxSource(javax.xml.stream.XMLEventReader eventReader)
Constructs a new instance of the StaxSource with the specified XMLEventReader. |
|
StaxSource(javax.xml.stream.XMLStreamReader streamReader)
Constructs a new instance of the StaxSource with the specified XMLStreamReader. |
|
| Method Summary | |
|---|---|
javax.xml.stream.XMLEventReader |
getXMLEventReader()
Returns the XMLEventReader used by this StaxSource. |
javax.xml.stream.XMLStreamReader |
getXMLStreamReader()
Returns the XMLStreamReader used by this StaxSource. |
void |
setInputSource(org.xml.sax.InputSource inputSource)
Throws a UnsupportedOperationException. |
void |
setXMLReader(org.xml.sax.XMLReader reader)
Throws a UnsupportedOperationException. |
| Methods inherited from class javax.xml.transform.sax.SAXSource |
|---|
getInputSource, getSystemId, getXMLReader, setSystemId, sourceToInputSource |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StaxSource(javax.xml.stream.XMLStreamReader streamReader)
StaxSource with the specified XMLStreamReader. The
supplied stream reader must be in XMLStreamConstants.START_DOCUMENT or
XMLStreamConstants.START_ELEMENT state.
streamReader - the XMLStreamReader to read from
java.lang.IllegalStateException - if the reader is not at the start of a document or elementpublic StaxSource(javax.xml.stream.XMLEventReader eventReader)
StaxSource with the specified XMLEventReader. The
supplied event reader must be in XMLStreamConstants.START_DOCUMENT or
XMLStreamConstants.START_ELEMENT state.
eventReader - the XMLEventReader to read from
java.lang.IllegalStateException - if the reader is not at the start of a document or element| Method Detail |
|---|
public javax.xml.stream.XMLEventReader getXMLEventReader()
XMLEventReader used by this StaxSource. If this StaxSource was
created with an XMLStreamReader, the result will be null.
StaxSource(javax.xml.stream.XMLEventReader)public javax.xml.stream.XMLStreamReader getXMLStreamReader()
XMLStreamReader used by this StaxSource. If this StaxSource
was created with an XMLEventReader, the result will be null.
StaxSource(javax.xml.stream.XMLEventReader)public void setInputSource(org.xml.sax.InputSource inputSource)
UnsupportedOperationException.
setInputSource in class javax.xml.transform.sax.SAXSourcejava.lang.UnsupportedOperationException - alwayspublic void setXMLReader(org.xml.sax.XMLReader reader)
UnsupportedOperationException.
setXMLReader in class javax.xml.transform.sax.SAXSourcejava.lang.UnsupportedOperationException - always
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||