org.mule.module.xml.stax
Class XMLStreamReaderToContentHandler

java.lang.Object
  extended by org.mule.module.xml.stax.XMLStreamReaderToContentHandler
All Implemented Interfaces:
javanet.staxutils.StAXReaderToContentHandler

public class XMLStreamReaderToContentHandler
extends Object
implements javanet.staxutils.StAXReaderToContentHandler

This is a simple utility class that adapts StAX events from an XMLStreamReader to SAX events on a ContentHandler, bridging between the two parser technologies.

Version:
1.0
Author:
Ryan.Shoemaker@Sun.COM

Constructor Summary
XMLStreamReaderToContentHandler(XMLStreamReader staxCore, javanet.staxutils.helpers.XMLFilterImplEx filter)
          Construct a new StAX to SAX adapter that will convert a StAX event stream into a SAX event stream.
 
Method Summary
 void bridge()
           
protected  Attributes getAttributes()
          Get the attributes associated with the given START_ELEMENT or ATTRIBUTE StAXevent.
protected  void handleAttribute()
           
protected  void handleCDATA()
           
protected  void handleCharacters()
           
protected  void handleComment()
           
protected  void handleDTD()
           
protected  void handleEndDocument()
           
protected  void handleEndElement()
           
protected  void handleEntityDecl()
           
protected  void handleEntityReference()
           
protected  void handleNamespace()
           
protected  void handleNotationDecl()
           
protected  void handlePI()
           
protected  void handleSpace()
           
protected  void handleStartDocument()
           
protected  void handleStartElement()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLStreamReaderToContentHandler

public XMLStreamReaderToContentHandler(XMLStreamReader staxCore,
                                       javanet.staxutils.helpers.XMLFilterImplEx filter)
Construct a new StAX to SAX adapter that will convert a StAX event stream into a SAX event stream.

Parameters:
staxCore - StAX event source
filter - SAX event sink
Method Detail

bridge

public void bridge()
            throws XMLStreamException
Specified by:
bridge in interface javanet.staxutils.StAXReaderToContentHandler
Throws:
XMLStreamException

handleEndDocument

protected void handleEndDocument()
                          throws SAXException
Throws:
SAXException

handleStartDocument

protected void handleStartDocument()
                            throws SAXException
Throws:
SAXException

handlePI

protected void handlePI()
                 throws XMLStreamException
Throws:
XMLStreamException

handleCharacters

protected void handleCharacters()
                         throws XMLStreamException
Throws:
XMLStreamException

handleEndElement

protected void handleEndElement()
                         throws XMLStreamException
Throws:
XMLStreamException

handleStartElement

protected void handleStartElement()
                           throws XMLStreamException
Throws:
XMLStreamException

getAttributes

protected Attributes getAttributes()
Get the attributes associated with the given START_ELEMENT or ATTRIBUTE StAXevent.

Returns:
the StAX attributes converted to an org.xml.sax.Attributes

handleNamespace

protected void handleNamespace()

handleAttribute

protected void handleAttribute()

handleDTD

protected void handleDTD()

handleComment

protected void handleComment()
                      throws XMLStreamException
Throws:
XMLStreamException

handleEntityReference

protected void handleEntityReference()

handleSpace

protected void handleSpace()

handleNotationDecl

protected void handleNotationDecl()

handleEntityDecl

protected void handleEntityDecl()

handleCDATA

protected void handleCDATA()
                    throws XMLStreamException
Throws:
XMLStreamException


Copyright © 2003-2012 MuleSoft, Inc.. All Rights Reserved.