org.pasoa.dommap
Class DOMWriter

java.lang.Object
  extended by org.pasoa.dommap.DOMWriter

public class DOMWriter
extends Object

Provides convience methods for writing a org.w3c.dom.document to a string.

Author:
sm

Constructor Summary
DOMWriter(OutputStream output)
           
DOMWriter(Writer output)
           
 
Method Summary
 void setFormatted(boolean isFormatted)
           
 void write(Attr node)
           
 void write(Document node)
          Convenience method for writing a document with no namespaces already declared and 0 initial indent.
 void write(Document node, Map declared, int indent)
          Write a document out specifying which namespaces have already been declared and the initial indent of elements.
 void write(Element node)
           
 void write(Element node, Map declared, int indent)
           
 void write(Text node)
           
static String writeNamespaces(Node toWrite)
           
static String writeToString(Node toWrite)
           
static String writeToString(Node toWrite, boolean format)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DOMWriter

public DOMWriter(Writer output)

DOMWriter

public DOMWriter(OutputStream output)
Method Detail

setFormatted

public void setFormatted(boolean isFormatted)

write

public void write(Attr node)
           throws IOException
Throws:
IOException

write

public void write(Document node,
                  Map declared,
                  int indent)
           throws IOException
Write a document out specifying which namespaces have already been declared and the initial indent of elements.

Throws:
IOException

write

public void write(Document node)
           throws IOException
Convenience method for writing a document with no namespaces already declared and 0 initial indent.

Throws:
IOException

write

public void write(Element node)
           throws IOException
Throws:
IOException

write

public void write(Element node,
                  Map declared,
                  int indent)
           throws IOException
Throws:
IOException

write

public void write(Text node)
           throws IOException
Throws:
IOException

writeNamespaces

public static String writeNamespaces(Node toWrite)

writeToString

public static String writeToString(Node toWrite)

writeToString

public static String writeToString(Node toWrite,
                                   boolean format)