maiolum.util
Class SimpleNodeSerializer

java.lang.Object
  extended bymaiolum.util.SimpleNodeSerializer

public class SimpleNodeSerializer
extends java.lang.Object

This is a helper class to make easier serializing org.w3c.dom.Nodes to the given Writer. Most times will be XML DOM representation serialized to System.out.


Constructor Summary
SimpleNodeSerializer()
           
 
Method Summary
static void serializeNode(org.w3c.dom.Node n)
          Serializes DOM Node to System.out.
static void serializeNode(org.w3c.dom.Node n, java.io.Writer w)
          Serializes DOM Node to given Writer, effectively transforming internal XML representation to textual representation.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleNodeSerializer

public SimpleNodeSerializer()
Method Detail

serializeNode

public static void serializeNode(org.w3c.dom.Node n,
                                 java.io.Writer w)
                          throws javax.xml.transform.TransformerConfigurationException,
                                 javax.xml.transform.TransformerException
Serializes DOM Node to given Writer, effectively transforming internal XML representation to textual representation.

Throws:
javax.xml.transform.TransformerException - if unrecoverable error occurs during the process of transformation.
javax.xml.transform.TransformerConfigurationException - if tranformation factory cannot be instantiated

serializeNode

public static void serializeNode(org.w3c.dom.Node n)
                          throws javax.xml.transform.TransformerConfigurationException,
                                 javax.xml.transform.TransformerException
Serializes DOM Node to System.out. Effectively prints internal XML representation to the console or other device associated with System.out.

Throws:
javax.xml.transform.TransformerException - if unrecoverable error occurs during the process of transformation.
javax.xml.transform.TransformerConfigurationException - if tranformation factory cannot be instantiated