com.echomine.jabber.parser
Class JabberXPPParser

java.lang.Object
  extended by com.echomine.jabber.parser.JabberXPPParser
All Implemented Interfaces:
JabberSAXParser

public class JabberXPPParser
extends java.lang.Object
implements JabberSAXParser

This uses the XML Pull Parser as the underlying xml parser. As XPP is a pull-based parser, it requires a SAX-based driver (provided with XPP) to translate the pull parsing events into SAX events.


Constructor Summary
JabberXPPParser()
           
 
Method Summary
 void parse(boolean validating, boolean namespaceAware, JabberContentHandler contentHandler, JabberErrorHandler errorHandler, org.xml.sax.InputSource reader)
          this method will create the parser, set the handlers, and run the parser.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JabberXPPParser

public JabberXPPParser()
Method Detail

parse

public void parse(boolean validating,
                  boolean namespaceAware,
                  JabberContentHandler contentHandler,
                  JabberErrorHandler errorHandler,
                  org.xml.sax.InputSource reader)
this method will create the parser, set the handlers, and run the parser. The method will be run in its own thread so you don't have to worry about IO Blocking. This InputSource is actually the incoming socket reader from the Jabber connection.

Specified by:
parse in interface JabberSAXParser
Parameters:
validating - whether to validate the document or not based on the DTD
namespaceAware - whether the parser should be aware of namespaces
contentHandler - the content handler class for receiving the sax events
errorHandler - optional handler to receive error events (null if not used)
reader - the stream to read the document from


Copyright © 2001-2005 Echomine. All Rights Reserved.