ucar.xml
Class Serializer

java.lang.Object
  |
  +--ucar.xml.Serializer

public class Serializer
extends java.lang.Object

Utility class for writing XML to output. It contains only static methods.


Constructor Summary
Serializer()
           
 
Method Summary
static void DOMout(org.w3c.dom.Element root)
          Method to write a DOM document to System.out
static void DOMtoFile(org.w3c.dom.Element root, java.lang.String outputFile)
          Method to write a DOM document to file
static void JDOMout(org.jdom.Document jdoc)
          Method to write a JDOM document to System.out
static void JDOMout(java.lang.String xml)
          Method to deserialize a JDOM document from a String and write it to System.out
static void JDOMtoFile(org.jdom.Document jdoc, java.lang.String outputFile)
          Method to write a JDOM document to file
static void JDOMtoFile(java.lang.String xml, java.lang.String outputFile)
          Method to deserialize a JDOM document from a String and write it to a file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Serializer

public Serializer()
Method Detail

DOMtoFile

public static void DOMtoFile(org.w3c.dom.Element root,
                             java.lang.String outputFile)
                      throws java.io.IOException
Method to write a DOM document to file

Parameters:
root - the root element of the DOM document
outputFile - the intended xml output file
Throws:
IOException

DOMout

public static void DOMout(org.w3c.dom.Element root)
                   throws java.io.IOException
Method to write a DOM document to System.out

Parameters:
root - the root element of the DOM document
Throws:
IOException

JDOMtoFile

public static void JDOMtoFile(org.jdom.Document jdoc,
                              java.lang.String outputFile)
                       throws java.io.IOException
Method to write a JDOM document to file

Parameters:
jdoc - the JDOM document
outputFile - the intended xml output file
Throws:
IOException

JDOMtoFile

public static void JDOMtoFile(java.lang.String xml,
                              java.lang.String outputFile)
                       throws java.io.IOException,
                              org.jdom.JDOMException
Method to deserialize a JDOM document from a String and write it to a file

Parameters:
xml - the String containig the serialized xml document
outputFile - the intended xml output file
Throws:
IOException
JDOMException

JDOMout

public static void JDOMout(org.jdom.Document jdoc)
                    throws java.io.IOException
Method to write a JDOM document to System.out

Parameters:
jdoc - the JDOM document
Throws:
IOException

JDOMout

public static void JDOMout(java.lang.String xml)
                    throws java.io.IOException,
                           org.jdom.JDOMException
Method to deserialize a JDOM document from a String and write it to System.out

Parameters:
xml - the String containig the serialized xml document
Throws:
IOException
JDOMException