gnu.xml
Class ParsedXMLToConsumer

java.lang.Object
  extended by gnu.xml.ParsedXMLHandler
      extended by gnu.xml.ParsedXMLToConsumer

public class ParsedXMLToConsumer
extends ParsedXMLHandler


Field Summary
 boolean namespacePrefixes
          True if namespace declarations should be passed through as attributes.
 
Constructor Summary
ParsedXMLToConsumer(Consumer out)
           
 
Method Summary
 void emitBeginAttribute(char[] data, int start, int count)
          Process an attribute, with the given attribute name.
 void emitBeginElement(char[] data, int start, int count)
          Process a start tag, with the given element name.
 void emitCDATA(char[] data, 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[] data, 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[] data, int start, int length)
          Process an end tag.
 void emitEntityReference(char[] name, int start, int length)
          Handles the predefined entities, such as "<" and """.
 void emitProcessingInstruction(char[] buffer, int tstart, int tlength, int dstart, int dlength)
          Process a processing incluction.
 void setParser(XMLParserChar parser)
           
 void writeBoolean(boolean v)
           
 void writeDouble(double v)
           
 void writeFloat(float v)
           
 void writeInt(int v)
           
 void writeLong(long v)
           
 void writeObject(java.lang.Object v)
           
 
Methods inherited from class gnu.xml.ParsedXMLHandler
error, error
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

namespacePrefixes

public boolean namespacePrefixes
True if namespace declarations should be passed through as attributes. Like SAX2's http://xml.org/features/namespace-prefixes.

Constructor Detail

ParsedXMLToConsumer

public ParsedXMLToConsumer(Consumer out)
Method Detail

setParser

public void setParser(XMLParserChar parser)

writeBoolean

public void writeBoolean(boolean v)

writeFloat

public void writeFloat(float v)

writeDouble

public void writeDouble(double v)

writeInt

public void writeInt(int v)

writeLong

public void writeLong(long v)

writeObject

public void writeObject(java.lang.Object v)

emitCharacters

public void emitCharacters(char[] data,
                           int start,
                           int length)
Description copied from class: ParsedXMLHandler
Process raw text.

Overrides:
emitCharacters in class ParsedXMLHandler

emitCDATA

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

Overrides:
emitCDATA in class ParsedXMLHandler

emitBeginElement

public void emitBeginElement(char[] data,
                             int start,
                             int count)
Description copied from class: ParsedXMLHandler
Process a start tag, with the given element name.

Overrides:
emitBeginElement in class ParsedXMLHandler

emitBeginAttribute

public void emitBeginAttribute(char[] data,
                               int start,
                               int count)
Description copied from class: ParsedXMLHandler
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.

Overrides:
emitBeginAttribute in class ParsedXMLHandler

emitEndAttributes

public void emitEndAttributes()
Description copied from class: ParsedXMLHandler
Process the end of a start tag. There are no more attributes.

Overrides:
emitEndAttributes in class ParsedXMLHandler

emitEndElement

public void emitEndElement(char[] data,
                           int start,
                           int length)
Description copied from class: ParsedXMLHandler
Process an end tag. An abbrevated tag (such as '
') has a name==null.

Overrides:
emitEndElement in class ParsedXMLHandler

emitEntityReference

public void emitEntityReference(char[] name,
                                int start,
                                int length)
Handles the predefined entities, such as "<" and """.

Overrides:
emitEntityReference in class ParsedXMLHandler

emitCharacterReference

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

Overrides:
emitCharacterReference in class ParsedXMLHandler

emitComment

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

Overrides:
emitComment in class ParsedXMLHandler

emitProcessingInstruction

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

Overrides:
emitProcessingInstruction in class ParsedXMLHandler

emitDoctypeDecl

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

Overrides:
emitDoctypeDecl in class ParsedXMLHandler