org.mmbase.util.xml
Class XMLWriter

java.lang.Object
  extended by org.mmbase.util.xml.XMLWriter

public class XMLWriter
extends Object

Util class to serialize xml (wrapper around javax.xml.transform.Transformer)

Since:
MMBase-1.7
Author:
Kees Jongenburger

Method Summary
static String write(Collection<? extends Node> c)
           
static String write(Node node)
           
static String write(Node node, boolean indent)
          Defaulting version of write(Node, boolean, boolean).
static String write(Node node, boolean indent, boolean omitxml)
          static method to serialize a node to a string
static void write(Node node, Writer writer, boolean indent)
          defaulting version of write(Node, Writer, boolean, boolean).
static void write(Node node, Writer writer, boolean indent, boolean omitxml)
          static method to serialize an DOM document
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

write

public static void write(Node node,
                         Writer writer,
                         boolean indent)
                  throws TransformerConfigurationException,
                         TransformerException
defaulting version of write(Node, Writer, boolean, boolean). (Not ommitting xml declaration).

Throws:
TransformerConfigurationException
TransformerException

write

public static void write(Node node,
                         Writer writer,
                         boolean indent,
                         boolean omitxml)
                  throws TransformerConfigurationException,
                         TransformerException
static method to serialize an DOM document

Parameters:
node - the node to serialize
writer - the writer to write the node to
indent - if true the document wil be indented
omitxml -
Throws:
TransformerConfigurationException
TransformerException

write

public static String write(Node node,
                           boolean indent)
Defaulting version of write(Node, boolean, boolean). (Not ommitting xml declaration).


write

public static String write(Node node)
Since:
MMBase-1.9

write

public static String write(Collection<? extends Node> c)
Since:
MMBase-1.9

write

public static String write(Node node,
                           boolean indent,
                           boolean omitxml)
static method to serialize a node to a string

Parameters:
node - the node to serialize
indent - , if true the node wil be indented
omitxml -
Returns:
the string represneation of the xml of null if an error occured


MMBase 2.0-SNAPSHOT - null