gnu.xml
Class XMLParserChar

java.lang.Object
  extended by gnu.xml.XMLParserChar
Direct Known Subclasses:
XMLParser

public class XMLParserChar
extends java.lang.Object

Reads XML from a char array. Assumes a state-less character encoding containing ascii as a sub-set, and where no byte in a multi-byte character is the same as a xml special character. Any bytes with high-order bit set are treated as if they are letters, and can be part of names. Handles CR/LF, CDATA, entity references, processing instructions, DOCTYPE, as well as the obvious (text, element, and attributes).


Field Summary
protected  char[] buffer
           
protected  java.io.Reader in
           
protected  int limit
           
protected  int pos
           
 
Constructor Summary
XMLParserChar(char[] buffer, int pos, int limit, ParsedXMLHandler out)
           
XMLParserChar(java.io.Reader in, ParsedXMLHandler out)
           
XMLParserChar(java.net.URL url, ParsedXMLHandler out)
           
 
Method Summary
 void error(char severity, java.lang.String message)
           
 int fill(char[] buffer, int start, int pos)
          Fill the buffer with more data.
 void parse()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

buffer

protected char[] buffer

pos

protected int pos

limit

protected int limit

in

protected java.io.Reader in
Constructor Detail

XMLParserChar

public XMLParserChar(java.io.Reader in,
                     ParsedXMLHandler out)

XMLParserChar

public XMLParserChar(char[] buffer,
                     int pos,
                     int limit,
                     ParsedXMLHandler out)

XMLParserChar

public XMLParserChar(java.net.URL url,
                     ParsedXMLHandler out)
              throws java.io.IOException
Throws:
java.io.IOException
Method Detail

parse

public void parse()

fill

public int fill(char[] buffer,
                int start,
                int pos)
Fill the buffer with more data.

Parameters:
start - start of current token.
pos - index of current read position

error

public void error(char severity,
                  java.lang.String message)