org.xwiki.xml.stax
Class SAXEventConsumer

java.lang.Object
  extended by org.xwiki.xml.stax.SAXEventConsumer
All Implemented Interfaces:
XMLEventConsumer
Direct Known Subclasses:
SAXEventWriter

public class SAXEventConsumer
extends Object
implements XMLEventConsumer

Receive and convert StAX events to SAX events.

It's a modification of the code from javanet.staxutils.XMLEventReaderToContentHandler that can be used as XMLEventConsumer since SAX result is not supported by standard XMLOutputFactory.

Since:
5.2M1
Version:
$Id: 0b4e0bb2900f98f2b82e7a5870c86e63cfb6e272 $

Constructor Summary
SAXEventConsumer(ContentHandler handler)
           
 
Method Summary
 void add(XMLEvent event)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SAXEventConsumer

public SAXEventConsumer(ContentHandler handler)
Parameters:
handler - the content handler
Method Detail

add

public void add(XMLEvent event)
         throws XMLStreamException
Specified by:
add in interface XMLEventConsumer
Throws:
XMLStreamException


Copyright © 2004-2013 XWiki. All Rights Reserved.