org.jtool.jxplatform.dom
Class DomWriter

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

public class DomWriter
extends java.lang.Object

Produces XML documents from DOM object trees.

Author:
Katsuhisa Maruyama

Constructor Summary
DomWriter()
           
 
Method Summary
static java.lang.String getXMLText(org.w3c.dom.Document doc, java.lang.String charsetName)
          Returns an XML document from the DOM object tree.
static java.lang.String getXMLText(org.w3c.dom.Document doc, java.lang.String charsetName, java.lang.String dtdName)
          Returns an XML document from a DOM object tree.
static java.lang.String getXMLText(org.w3c.dom.Node node)
          Returns an XML document from the subtree of DOM objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DomWriter

public DomWriter()
Method Detail

getXMLText

public static java.lang.String getXMLText(org.w3c.dom.Document doc,
                                          java.lang.String charsetName)
Returns an XML document from the DOM object tree.

Parameters:
doc - The root of a DOM object tree to be visited.
charsetName - The name of an XML document's charset.
Returns:
The text of the XML document.

getXMLText

public static java.lang.String getXMLText(org.w3c.dom.Document doc,
                                          java.lang.String charsetName,
                                          java.lang.String dtdName)
Returns an XML document from a DOM object tree.

Parameters:
doc - The root of a DOM object tree to be visited.
charsetName - The name of an XML document's charset.
dtdName - The DTD file name for a new XML document.
Returns:
The text of the XML document.

getXMLText

public static java.lang.String getXMLText(org.w3c.dom.Node node)
Returns an XML document from the subtree of DOM objects.

Parameters:
node - A DOM node which is the root of a DOM object subtree to be visited.
Returns:
The text of the XML document.