|
BEA Systems, Inc. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface XMLInputStream
This is the top level interface for iterating over XML Events in an XML document.
Difference from SAX
An event stream can be thought of encapsulating SAX events. It applies an iterator/pull metaphor to the parser allowing procedural, stream-based, handling of input XML rather than having to write chained event handlers to handle complex XML documents.
Difference from DOM
The pull metaphor allows single-pass, stream-based parsing of the document rather than tree based manipulation.
XMLEvent
,
CharacterData
,
ProcessingInstruction
,
StartElement
,
EndElement
,
CharacterData
,
XMLName
Method Summary | |
---|---|
void |
close()
Deprecated. Closes this input stream and releases any system resources associated with the stream. |
ReferenceResolver |
getReferenceResolver()
Deprecated. Returns the reference resolver that was set for this stream, returns null if no ReferenceResolver has been set. |
XMLInputStream |
getSubStream()
Deprecated. getSubStream() returns a stream which points to the entire next element in the current stream. |
boolean |
hasNext()
Deprecated. Check if there are more events to pull of the stream |
XMLEvent |
next()
Deprecated. Get the next XMLEvent on the stream |
XMLEvent |
peek()
Deprecated. Check the next XMLEvent without reading it from the stream. |
void |
setReferenceResolver(ReferenceResolver resolver)
Deprecated. Provides a way to set the ReferenceResolver of the stream, this is mostly needed for handle references to other parts of the document. |
void |
skip()
Deprecated. Skip the next stream event |
boolean |
skip(int eventType)
Deprecated. Position the stream at the next XMLEvent of this type. |
boolean |
skip(XMLName name)
Deprecated. Position the stream at the next element of this name. |
boolean |
skip(XMLName name,
int eventType)
Deprecated. Position the stream at the next element of this name and this type. |
void |
skipElement()
Deprecated. Skips the entire next start tag / end tag pair. |
Method Detail |
---|
XMLEvent next() throws XMLStreamException
XMLStreamException
XMLEvent
boolean hasNext() throws XMLStreamException
XMLStreamException
XMLEvent
void skip() throws XMLStreamException
XMLStreamException
void skipElement() throws XMLStreamException
XMLStreamException
XMLEvent peek() throws XMLStreamException
XMLStreamException
XMLEvent
boolean skip(int eventType) throws XMLStreamException
eventType
- An integer code that indicates the element type.
XMLStreamException
XMLEvent
boolean skip(XMLName name) throws XMLStreamException
name
- An object that defines an XML name.
If the XMLName.getNameSpaceName() method on the XMLName argument returns
null the XMLName will match just the local name. Prefixes are
not checked for equality.
XMLStreamException
XMLName
boolean skip(XMLName name, int eventType) throws XMLStreamException
name
- An object that defines an XML name.
If the XMLName.getNameSpaceName() method on the XMLName argument returns
null the XMLName will match just the local name. Prefixes are
not checked for equality.eventType
- An integer code that indicates the element type.
XMLStreamException
XMLEvent
,
XMLName
XMLInputStream getSubStream() throws XMLStreamException
XMLStreamException
void close() throws XMLStreamException
XMLStreamException
ReferenceResolver getReferenceResolver()
ReferenceResolver
void setReferenceResolver(ReferenceResolver resolver)
ReferenceResolver
|
Documentation is available at http://download.oracle.com/docs/cd/E13222_01/wls/docs92 Copyright 2006 BEA Systems Inc. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |