gnu.xml
Class ParsedXMLHandler

java.lang.Object
  extended by gnu.xml.ParsedXMLHandler
Direct Known Subclasses:
ParsedXMLToConsumer

public class ParsedXMLHandler
extends java.lang.Object

Handle the output from XMLParser, or other char-array-oriented XML source.


Constructor Summary
ParsedXMLHandler()
           
 
Method Summary
 void emitBeginAttribute(char[] name, int start, int length)
          Process an attribute, with the given attribute name.
 void emitBeginElement(char[] name, int start, int length)
          Process a start tag, with the given element name.
 void emitCDATA(char[] text, int start, int length)
          Process a CDATA section.
 void emitCharacterReference(int value, char[] name, int start, int length)
          Process a character entity reference.
 void emitCharacters(char[] text, int start, int length)
          Process raw text.
 void emitComment(char[] data, int start, int length)
          Process a comment.
 void emitDoctypeDecl(char[] buffer, int target, int tlength, int data, int dlength)
          Process a DOCTYPE declaration.
 void emitEndAttributes()
          Process the end of a start tag.
 void emitEndElement(char[] name, int start, int length)
          Process an end tag.
 void emitEntityReference(char[] name, int start, int length)
          Process an entity reference.
 void emitProcessingInstruction(char[] buffer, int target, int tlength, int data, int dlength)
          Process a processing incluction.
 void error(XMLParserChar parser, java.lang.String message)
           
static void error(XMLParserChar parser, java.lang.String message, java.lang.StringBuffer sbuf)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParsedXMLHandler

public ParsedXMLHandler()
Method Detail

emitCharacters

public void emitCharacters(char[] text,
                           int start,
                           int length)
Process raw text.


emitBeginElement

public void emitBeginElement(char[] name,
                             int start,
                             int length)
Process a start tag, with the given element name.


emitBeginAttribute

public void emitBeginAttribute(char[] name,
                               int start,
                               int length)
Process an attribute, with the given attribute name. The attribute value is given using emitCharacters. The value is terminated by either another emitBeginAttribute or an emitEndAttributes.


emitEndAttributes

public void emitEndAttributes()
Process the end of a start tag. There are no more attributes.


emitEndElement

public void emitEndElement(char[] name,
                           int start,
                           int length)
Process an end tag. An abbrevated tag (such as '
') has a name==null.


emitEntityReference

public void emitEntityReference(char[] name,
                                int start,
                                int length)
Process an entity reference. The entity name is given.


emitCharacterReference

public void emitCharacterReference(int value,
                                   char[] name,
                                   int start,
                                   int length)
Process a character entity reference. The string encoding of the character (e.g. "xFF" or "255") is given, as well as the character value.


emitComment

public void emitComment(char[] data,
                        int start,
                        int length)
Process a comment. The data (starting at start for length chars). Does not include the delimiters (i.e. "" are excluded).


emitCDATA

public void emitCDATA(char[] text,
                      int start,
                      int length)
Process a CDATA section. The data (starting at start for length chars). Does not include the delimiters (i.e. "" are excluded).


emitProcessingInstruction

public void emitProcessingInstruction(char[] buffer,
                                      int target,
                                      int tlength,
                                      int data,
                                      int dlength)
Process a processing incluction.


emitDoctypeDecl

public void emitDoctypeDecl(char[] buffer,
                            int target,
                            int tlength,
                            int data,
                            int dlength)
Process a DOCTYPE declaration.


error

public void error(XMLParserChar parser,
                  java.lang.String message)

error

public static void error(XMLParserChar parser,
                         java.lang.String message,
                         java.lang.StringBuffer sbuf)