com.softsynth.util
Class XMLPrinter

java.lang.Object
  extended byjava.io.Writer
      extended byjava.io.PrintWriter
          extended bycom.softsynth.util.IndentingWriter
              extended bycom.softsynth.util.XMLPrinter
All Implemented Interfaces:
XMLListener

public class XMLPrinter
extends com.softsynth.util.IndentingWriter
implements XMLListener


Constructor Summary
XMLPrinter()
           
XMLPrinter(java.io.OutputStream stream)
           
 
Method Summary
 void beginElement(java.lang.String tag, java.util.Hashtable attributes, boolean ifEmpty)
          Handles the start of an element.
 void endElement(java.lang.String tag)
          Handles the end of an element.
 void foundContent(java.lang.String content)
          Handles the content of an element.
static void main(java.lang.String[] args)
          Print a file passed as a command line argument.
 
Methods inherited from class com.softsynth.util.IndentingWriter
getIndentation, indent, print, println, println, setIndentation, undent
 
Methods inherited from class java.io.PrintWriter
checkError, close, flush, print, print, print, print, print, print, print, print, println, println, println, println, println, println, println, println, write, write, write, write, write
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLPrinter

public XMLPrinter()

XMLPrinter

public XMLPrinter(java.io.OutputStream stream)
Method Detail

main

public static void main(java.lang.String[] args)
Print a file passed as a command line argument.


beginElement

public void beginElement(java.lang.String tag,
                         java.util.Hashtable attributes,
                         boolean ifEmpty)
Description copied from interface: XMLListener
Handles the start of an element. The flag ifEmpty if there is no content or endTag.

Specified by:
beginElement in interface XMLListener

foundContent

public void foundContent(java.lang.String content)
Description copied from interface: XMLListener
Handles the content of an element.

Specified by:
foundContent in interface XMLListener

endElement

public void endElement(java.lang.String tag)
Description copied from interface: XMLListener
Handles the end of an element.

Specified by:
endElement in interface XMLListener