org.pasoa.dommap
Class DOMWriter
java.lang.Object
org.pasoa.dommap.DOMWriter
- public class DOMWriter
- extends Object
Provides convience methods for writing a org.w3c.dom.document
to a string.
- Author:
- sm
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DOMWriter
public DOMWriter(Writer output)
DOMWriter
public DOMWriter(OutputStream output)
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)