sdlip.xml.dom
Class DOMWriter

java.lang.Object
  |
  +--sdlip.xml.dom.DOMWriter

public class DOMWriter
extends java.lang.Object


Field Summary
protected  boolean canonical
          Canonical output.
protected  java.io.PrintWriter out
          Print writer.
 
Constructor Summary
  DOMWriter()
           
  DOMWriter(boolean canonical)
           
  DOMWriter(java.io.PrintWriter out)
          Default constructor.
protected DOMWriter(java.io.PrintWriter out, boolean canonical)
           
 
Method Summary
static void main(java.lang.String[] argv)
          Main program entry point.
protected  java.lang.String normalize(java.lang.String s)
          Normalizes the given string.
static java.lang.String prettyPrint(org.w3c.dom.Node node)
           
static java.lang.String prettyPrint(java.lang.String xmldata)
           
 void print(org.w3c.dom.Node node)
           
static void print(java.lang.String uri, boolean canonical)
          Prints the resulting document tree.
static java.lang.String serialize(org.w3c.dom.Node node)
           
 void setAutoIndent(boolean b)
           
protected  org.w3c.dom.Attr[] sortAttributes(org.w3c.dom.NamedNodeMap attrs)
          Returns a sorted list of attributes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

out

protected java.io.PrintWriter out
Print writer.

canonical

protected boolean canonical
Canonical output.
Constructor Detail

DOMWriter

public DOMWriter(java.io.PrintWriter out)
Default constructor.

DOMWriter

public DOMWriter(boolean canonical)

DOMWriter

public DOMWriter()

DOMWriter

protected DOMWriter(java.io.PrintWriter out,
                    boolean canonical)
Method Detail

print

public static void print(java.lang.String uri,
                         boolean canonical)
Prints the resulting document tree.

prettyPrint

public static java.lang.String prettyPrint(java.lang.String xmldata)
                                    throws java.lang.Exception

prettyPrint

public static java.lang.String prettyPrint(org.w3c.dom.Node node)

setAutoIndent

public void setAutoIndent(boolean b)

serialize

public static java.lang.String serialize(org.w3c.dom.Node node)

print

public void print(org.w3c.dom.Node node)

normalize

protected java.lang.String normalize(java.lang.String s)
Normalizes the given string.

sortAttributes

protected org.w3c.dom.Attr[] sortAttributes(org.w3c.dom.NamedNodeMap attrs)
Returns a sorted list of attributes.

main

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