| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--de.zeigermann.xpa.XMLFragmentParser
Rudimentary non-validating XML parser.
 
 Limitations:
 
XMLFragmentParser(Reader,XMLFragmentHandler): all unicode 
 characters are supported
 XMLFragmentParser(DataInputStream,XMLFragmentHandler): input
 stream will be interpreted as UTF-8 coded unicode which is fully supported
 
| Constructor Summary | |
protected  | 
XMLFragmentParser(DataInputStream in,
                  XMLFragmentHandler handler)
Creates a new parser with a byte stream of UTF-8 encoded characters as input.  | 
  | 
XMLFragmentParser(InputBuffer in,
                  XMLFragmentHandler handler)
Creates a new parser with an input buffer as input.  | 
  | 
XMLFragmentParser(InputStream in,
                  XMLFragmentHandler handler)
Creates a new parser with a byte stream of UTF-8 encoded characters as input.  | 
  | 
XMLFragmentParser(Reader in,
                  XMLFragmentHandler handler)
Creates a new parser with a reader as input.  | 
protected  | 
XMLFragmentParser(de.zeigermann.xpa.XMLLexer lexer,
                  XMLFragmentHandler handler)
Creates a new parser using lexer for actual parsing.  | 
| Method Summary | |
 void | 
parse()
Parses the full XML document defined as input by constructor and notifies handler set by setHandler(de.zeigermann.xpa.XMLFragmentHandler) or constructor
 upon identified XML tokens. | 
 void | 
parse(XMLFragmentHandler handler)
Parses the full XML document defined as input by constructor and notifies handler upon identified XML tokens.  | 
 boolean | 
pullNextToken()
Requests the next token notifying event to handler set by setHandler(de.zeigermann.xpa.XMLFragmentHandler). | 
 void | 
setHandler(XMLFragmentHandler handler)
Sets the handler to be notified upon identified XML tokens.  | 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
public XMLFragmentParser(Reader in,
                         XMLFragmentHandler handler)
in - the reader to parse XML fromhandler - the handler to notify upon identified XML tokens
public XMLFragmentParser(InputStream in,
                         XMLFragmentHandler handler)
in - the input stream to parse XML fromhandler - the handler to notify upon identified XML tokens
public XMLFragmentParser(InputBuffer in,
                         XMLFragmentHandler handler)
in - the input buffer to parse XML fromhandler - the handler to notify upon identified XML tokens
protected XMLFragmentParser(DataInputStream in,
                            XMLFragmentHandler handler)
in - the data input stream to parse XML fromhandler - the handler to notify upon identified XML tokens
protected XMLFragmentParser(de.zeigermann.xpa.XMLLexer lexer,
                            XMLFragmentHandler handler)
lexer - the lexer used to parse (fully initialized with input)handler - the handler to notify upon identified XML tokens| Method Detail | 
public void setHandler(XMLFragmentHandler handler)
handler - the handler to notify upon identified XML tokens
public void parse()
           throws XPAParseException
setHandler(de.zeigermann.xpa.XMLFragmentHandler) or constructor
 upon identified XML tokens.
XPAParseException
public void parse(XMLFragmentHandler handler)
           throws XPAParseException
handler - the handler to notify upon identified XML tokens
XPAParseException
public boolean pullNextToken()
                      throws XPAParseException
setHandler(de.zeigermann.xpa.XMLFragmentHandler).false is returned
 is an alternative to calling parse().
true if a token was found, false
 if we reached EOF
XPAParseException
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||