de.trantor.xml.pullparser
Class SaxPullParser

java.lang.Object
  |
  +--de.trantor.xml.pullparser.SaxPullParser

public class SaxPullParser
extends java.lang.Object
implements PullParser

An implementation of a namespace processing PullParser based on a standard SAX ("push") parser. SaxPullParser simply encapsulates a SAXParser converting it from a push to a pull parser.


Constructor Summary
SaxPullParser(org.xml.sax.Parser parser, org.xml.sax.InputSource inputSource)
          Creates a new pull parser from a SAX parser and a SAX input source
 
Method Summary
 ParseEvent peek()
          reads the next event available from the parser without consuming it
 int peekType()
          queries the type of the next parsing event.
 ParseEvent read()
          reads the next event available from the parser
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SaxPullParser

public SaxPullParser(org.xml.sax.Parser parser,
                     org.xml.sax.InputSource inputSource)
Creates a new pull parser from a SAX parser and a SAX input source
Method Detail

read

public ParseEvent read()
reads the next event available from the parser
Specified by:
read in interface PullParser

peek

public ParseEvent peek()
reads the next event available from the parser without consuming it
Specified by:
peek in interface PullParser

peekType

public int peekType()
queries the type of the next parsing event. Types are defined in DocumentEvent. convenience method for peek ().getType ()
Specified by:
peekType in interface PullParser