Spring Web Services Framework

org.springframework.xml.stream
Class StaxEventXmlReader

java.lang.Object
  extended by org.springframework.xml.sax.AbstractXmlReader
      extended by org.springframework.xml.stream.AbstractStaxXmlReader
          extended by org.springframework.xml.stream.StaxEventXmlReader
All Implemented Interfaces:
XMLReader

public class StaxEventXmlReader
extends AbstractStaxXmlReader

SAX XMLReader that reads from a StAX XMLEventReader. Consumes XMLEvents from an XMLEventReader, and calls the corresponding methods on the SAX callback interfaces.

Since:
1.0.0
Author:
Arjen Poutsma
See Also:
XMLEventReader, AbstractXmlReader.setContentHandler(org.xml.sax.ContentHandler), AbstractXmlReader.setDTDHandler(org.xml.sax.DTDHandler), AbstractXmlReader.setEntityResolver(org.xml.sax.EntityResolver), AbstractXmlReader.setErrorHandler(org.xml.sax.ErrorHandler)

Constructor Summary
StaxEventXmlReader(XMLEventReader reader)
          Constructs a new instance of the StaxEventXmlReader that reads from the given XMLEventReader.
 
Method Summary
protected  void parseInternal()
          Template-method that parses the StAX reader passed at construction-time.
 
Methods inherited from class org.springframework.xml.stream.AbstractStaxXmlReader
getFeature, hasNamespacePrefixesFeature, hasNamespacesFeature, parse, parse, setFeature, setLocator, setStandalone
 
Methods inherited from class org.springframework.xml.sax.AbstractXmlReader
getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getLexicalHandler, getProperty, setContentHandler, setDTDHandler, setEntityResolver, setErrorHandler, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StaxEventXmlReader

public StaxEventXmlReader(XMLEventReader reader)
Constructs a new instance of the StaxEventXmlReader that reads from the given XMLEventReader. The supplied event reader must be in XMLStreamConstants.START_DOCUMENT or XMLStreamConstants.START_ELEMENT state.

Parameters:
reader - the XMLEventReader to read from
Throws:
IllegalStateException - if the reader is not at the start of a document or element
Method Detail

parseInternal

protected void parseInternal()
                      throws SAXException,
                             XMLStreamException
Description copied from class: AbstractStaxXmlReader
Template-method that parses the StAX reader passed at construction-time.

Specified by:
parseInternal in class AbstractStaxXmlReader
Throws:
SAXException
XMLStreamException

Spring Web Services Framework

Copyright © 2005-2010 The Spring Web Services Framework. All Rights Reserved.