org.crosswire.common.xml
Class StringSAXEventProvider

java.lang.Object
  extended by org.crosswire.common.xml.StringSAXEventProvider
All Implemented Interfaces:
SAXEventProvider

public class StringSAXEventProvider
extends Object
implements SAXEventProvider

A SAXEventProvider that provides SAX events from a String.

Author:
Joe Walker
See Also:
The GNU Lesser General Public License for details.

Field Summary
private  XMLReader reader
          The SAX parser
private  String xmlstr
          The source of XML data
 
Constructor Summary
StringSAXEventProvider(String xmlstr)
          Simple ctor
 
Method Summary
 void provideSAXEvents(ContentHandler handler)
          When SAX events are required the user of this interface can call this method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

reader

private XMLReader reader
The SAX parser


xmlstr

private String xmlstr
The source of XML data

Constructor Detail

StringSAXEventProvider

public StringSAXEventProvider(String xmlstr)
                       throws ParserConfigurationException,
                              SAXException
Simple ctor

Parameters:
xmlstr - the xml as a string
Throws:
ParserConfigurationException - when there is a parser configuration problem
SAXException - when there is a SAX problem
Method Detail

provideSAXEvents

public void provideSAXEvents(ContentHandler handler)
                      throws SAXException
Description copied from interface: SAXEventProvider
When SAX events are required the user of this interface can call this method.

Specified by:
provideSAXEvents in interface SAXEventProvider
Parameters:
handler - The place to send SAX events.
Throws:
SAXException - when a SAX encounters a problem

Copyright ยจ 2003-2015