Spring Web Services Framework

org.springframework.xml.stream
Class StaxStreamXmlReader

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

public class StaxStreamXmlReader
extends AbstractStaxXmlReader

SAX XMLReader that reads from a StAX XMLStreamReader. Reads from an XMLStreamReader, and calls the corresponding methods on the SAX callback interfaces.

Since:
1.0.0
Author:
Arjen Poutsma
See Also:
XMLStreamReader, 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
StaxStreamXmlReader(XMLStreamReader reader)
          Constructs a new instance of the StaxStreamXmlReader that reads from the given XMLStreamReader.
 
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

StaxStreamXmlReader

public StaxStreamXmlReader(XMLStreamReader reader)
Constructs a new instance of the StaxStreamXmlReader that reads from the given XMLStreamReader. The supplied stream 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.