org.apache.manifoldcf.agents.common
Class XMLStream

java.lang.Object
  extended by org.apache.manifoldcf.agents.common.XMLStream

public class XMLStream
extends java.lang.Object

This object allows easier control of an XML parsing stream than does standard SAX.


Nested Class Summary
protected  class XMLStream.MyContentHandler
           
protected static class XMLStream.MyEntityResolver
           
protected  class XMLStream.MyErrorHandler
           
 
Field Summary
protected  XMLContext currentContext
          The current context
protected  org.xml.sax.SAXParseException parseException
          The parse exception we saw, if any
protected  org.xml.sax.XMLReader xr
          The xml reader object
 
Constructor Summary
XMLStream()
          Default constructor
XMLStream(boolean laxChecking)
          Constructor.
 
Method Summary
 void cleanup()
          Call this method to clean up completely after a parse attempt, whether successful or failure.
 XMLContext getContext()
           
 void parse(java.io.InputStream xmlInputStream)
           
 void setContext(XMLContext context)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

xr

protected org.xml.sax.XMLReader xr
The xml reader object


currentContext

protected XMLContext currentContext
The current context


parseException

protected org.xml.sax.SAXParseException parseException
The parse exception we saw, if any

Constructor Detail

XMLStream

public XMLStream(boolean laxChecking)
          throws ManifoldCFException
Constructor. This does NOT actually execute the parse yet, because we need the object before that makes any sense.

Throws:
ManifoldCFException

XMLStream

public XMLStream()
          throws ManifoldCFException
Default constructor

Throws:
ManifoldCFException
Method Detail

parse

public void parse(java.io.InputStream xmlInputStream)
           throws ManifoldCFException,
                  ServiceInterruption,
                  java.io.IOException
Throws:
ManifoldCFException
ServiceInterruption
java.io.IOException

cleanup

public void cleanup()
             throws ManifoldCFException
Call this method to clean up completely after a parse attempt, whether successful or failure.

Throws:
ManifoldCFException

setContext

public void setContext(XMLContext context)

getContext

public XMLContext getContext()