Top Fields Constructors Methods
com.sun.xml.fastinfoset.stax.util

public Class StAXFilteredParser

extends StAXParserWrapper
Class Inheritance
Imports
javax.xml.stream.XMLStreamException, .XMLStreamReader, .StreamFilter, com.sun.xml.fastinfoset.CommonResourceBundle

Field Summary

Modifier and TypeField and Description
private StreamFilter

Constructor Summary

AccessConstructor and Description
public
StAXFilteredParser()

Creates a new instance of StAXFilteredParser

public

Method Summary

Modifier and TypeMethod and Description
public boolean
hasNext()

Overrides com.sun.xml.fastinfoset.stax.util.StAXParserWrapper.hasNext.

Implements javax.xml.stream.XMLStreamReader.hasNext.

Returns true if there are more parsing events and false if there are no more events.

public int
next()

Overrides com.sun.xml.fastinfoset.stax.util.StAXParserWrapper.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 void
Inherited from com.sun.xml.fastinfoset.stax.util.StAXParserWrapper:
closegetAttributeCountgetAttributeLocalNamegetAttributeNamegetAttributeNamespacegetAttributePrefixgetAttributeTypegetAttributeValuegetAttributeValuegetCharacterEncodingSchemegetElementTextgetEncodinggetEventTypegetLocalNamegetLocationgetNamegetNamespaceContextgetNamespaceCountgetNamespacePrefixgetNamespaceURIgetNamespaceURIgetNamespaceURIgetPIDatagetPITargetgetPrefixgetPropertygetReadergetTextgetTextCharactersgetTextCharactersgetTextLengthgetTextStartgetVersionhasNamehasTextisAttributeSpecifiedisCharactersisEndElementisStandaloneisStartElementisWhiteSpacenextTagrequiresetReaderstandaloneSet

Field Detail

_filterback to summary
private StreamFilter _filter

Constructor Detail

StAXFilteredParserback to summary
public StAXFilteredParser()

Creates a new instance of StAXFilteredParser

StAXFilteredParserback to summary
public StAXFilteredParser(XMLStreamReader reader, StreamFilter filter)

Method Detail

hasNextback to summary
public boolean hasNext() throws XMLStreamException

Overrides com.sun.xml.fastinfoset.stax.util.StAXParserWrapper.hasNext.

Implements javax.xml.stream.XMLStreamReader.hasNext.

Doc from javax.xml.stream.XMLStreamReader.hasNext.

Returns true if there are more parsing events and false if there are no more events. This method will return false if the current state of the XMLStreamReader is END_DOCUMENT

Annotations
@Override
Exceptions
XMLStreamException:
if there is a fatal error detecting the next state
nextback to summary
public int next() throws XMLStreamException

Overrides com.sun.xml.fastinfoset.stax.util.StAXParserWrapper.next.

Implements javax.xml.stream.XMLStreamReader.next.

Doc from 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. If the property javax.xml.stream.isCoalescing is set to true element content must be coalesced and only one CHARACTERS event must be returned for contiguous element content or CDATA Sections. By default entity references must be expanded and reported transparently to the application. An exception will be thrown if an entity reference cannot be expanded. If element content is empty (i.e. content is "") then no CHARACTERS event will be reported.

Given the following XML:
<foo><!--description-->content text<![CDATA[<greeting>Hello>/greeting>]]>other content>/foo>
The behavior of calling next() when being on foo will be:
1- the comment (COMMENT)
2- then the characters section (CHARACTERS)
3- then the CDATA section (another CHARACTERS)
4- then the next characters section (another CHARACTERS)
5- then the END_ELEMENT

Note

empty element (such as <tag/>) will be reported with two separate events: START_ELEMENT, END_ELEMENT - This preserves parsing equivalency of empty element to <tag></tag>.

Annotations
@Override
Exceptions
XMLStreamException:
if there is an error processing the underlying XML source
setFilterback to summary
public void setFilter(StreamFilter filter)