xrel.xml
Class Writer

java.lang.Object
  |
  +--xrel.xml.Writer

public class Writer
extends java.lang.Object

A sample DOM writer. This sample program illustrates how to traverse a DOM tree in order to print a document that is parsed.

Version:
$Id: Writer.java,v 1.7 2002/01/29 01:15:05 lehors Exp $
Author:
Andy Clark, IBM

Constructor Summary
Writer()
          Default constructor.
Writer(boolean canonical)
           
 
Method Summary
static void main(java.lang.String[] argv)
          Main program entry point.
 void setCanonical(boolean canonical)
          Sets whether output is canonical.
 void setOutput(java.io.OutputStream stream, java.lang.String encoding)
          Sets the output stream for printing.
 void setOutput(java.io.Writer writer)
          Sets the output writer.
 void write(org.w3c.dom.Node node)
          Writes the specified node, recursively.
static void xmlWrite(java.io.PrintStream out, java.lang.String filename)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Writer

public Writer()
Default constructor.

Writer

public Writer(boolean canonical)
Method Detail

setCanonical

public void setCanonical(boolean canonical)
Sets whether output is canonical.

setOutput

public void setOutput(java.io.OutputStream stream,
                      java.lang.String encoding)
               throws java.io.UnsupportedEncodingException
Sets the output stream for printing.

setOutput

public void setOutput(java.io.Writer writer)
Sets the output writer.

write

public void write(org.w3c.dom.Node node)
Writes the specified node, recursively.

xmlWrite

public static void xmlWrite(java.io.PrintStream out,
                            java.lang.String filename)

main

public static void main(java.lang.String[] argv)
Main program entry point.