public class XMLWriter
extends java.lang.Object
Constructor and Description |
---|
XMLWriter(java.io.PrintStream printStream)
The constructor receiving the print stream.
|
Modifier and Type | Method and Description |
---|---|
protected void |
createProlog()
Create the prolog.
|
void |
lineNumbering(boolean flag)
Set the line numbering.
|
static void |
main(java.lang.String[] args) |
protected void |
print(java.lang.String s) |
protected void |
println() |
protected void |
println(java.lang.String s) |
void |
writeDOM(org.w3c.dom.Document dom)
Write the DOM to the stream.
|
void |
writeDOM(java.lang.String prefix,
org.w3c.dom.Document doc)
Write the DOM to the stream.
|
void |
writeNode(java.lang.String prefix,
org.w3c.dom.Node node)
Write out a single node.
|
public XMLWriter(java.io.PrintStream printStream)
printStream
- the print stream.public void lineNumbering(boolean flag)
flag
- if true the line numbering is active.protected void createProlog()
public void writeDOM(org.w3c.dom.Document dom) throws java.io.IOException
dom
- the dom to be written.java.io.IOException
public void writeDOM(java.lang.String prefix, org.w3c.dom.Document doc) throws java.io.IOException
prefix
- the prefix to use for each line.doc
- the document to be written.java.io.IOException
public void writeNode(java.lang.String prefix, org.w3c.dom.Node node)
prefix
- the prefix to use for each line.node
- the node to be written.protected void print(java.lang.String s)
protected void println()
protected void println(java.lang.String s)
public static void main(java.lang.String[] args)