org.jtool.jxplatform.dom
Class DomUnparser

java.lang.Object
  extended byorg.jtool.jxplatform.dom.DomUnparser

public class DomUnparser
extends java.lang.Object

Restores source code from DOM object trees.

Author:
Katsuhisa Maruyama

Constructor Summary
DomUnparser()
           
 
Method Summary
static java.lang.String getCode(org.w3c.dom.Document doc)
          Returns source code restored from a DOM tree.
static java.lang.String getCode(org.w3c.dom.Node node)
          Returns source code restored from a subtree of DOM objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DomUnparser

public DomUnparser()
Method Detail

getCode

public static java.lang.String getCode(org.w3c.dom.Document doc)
Returns source code restored from a DOM tree.

Parameters:
doc - The root of a DOM object tree to be visited.
Returns:
The restored source code.

getCode

public static java.lang.String getCode(org.w3c.dom.Node node)
Returns source code restored from a subtree of DOM objects.

Parameters:
node - A DOM node which is the root of a DOM object subtree to be visited.
Returns:
The part of the restored source code.