public class WriteXMLDoc extends Object
     Date:     22 SEP 03
     Time:     1826
     Author:   JDNeushul
     Comments: Initial
     Date:     25 NOV 05
     Time:     1617
     Author:   Terry Norbraten, NPS MOVES
     Comments: Updated to JDOM 1.1
 
     Date:     30 OCT 08
     Time:     0449Z
     Author:   Terry Norbraten, NPS MOVES
     Comments: Addition of DOM to JDOM conversion
   
 
| Constructor and Description | 
|---|
| WriteXMLDoc() | 
| Modifier and Type | Method and Description | 
|---|---|
| static Document | convertToDOM(org.jdom.Document jdomDoc)Covert an org.jdom.Document to an org.w3c.dom.Document | 
| static void | formatResultsFile(File file) | 
| static org.jdom.Element | getJdomElement(Node node)Convert an org.w3c.dom.Node to an org.jdom.Element | 
| static void | main(String[] args) | 
| static void | nodeOut(Node rootDirectory,
       String xmlFile)Write an entire XML document from DOM to the file specified | 
| static String | serializeDOMElement(Document xmlDoc,
                   boolean fOmitXMLDeclare,
                   boolean fPrettyPrint)Serialize a single DOM Element to String form | 
| static void | serializeDOMElement(Element c,
                   Writer writer)Serialize a single DOM Element to the underlying Writer | 
| static void | xmlOut(org.jdom.Document xmlDoc,
      String newFileName)Write an entire XML document from JDOM to the file specified | 
public static void main(String[] args)
public static void serializeDOMElement(Element c, Writer writer)
c - writer - public static String serializeDOMElement(Document xmlDoc, boolean fOmitXMLDeclare, boolean fPrettyPrint)
xmlDoc - the DOM fragment to serializefOmitXMLDeclare - true if no XML declarationfPrettyPrint - true means use Format.getPrettyFormat(), otherwise use Format.getRawFormat()String serialization as valid XMLpublic static void formatResultsFile(File file)
file - the XML file to format after marshalling outpublic static void nodeOut(Node rootDirectory, String xmlFile)
rootDirectory - the DOM document rootxmlFile - the file to write DOM out topublic static void xmlOut(org.jdom.Document xmlDoc,
          String newFileName)
xmlDoc - the JDOM document rootnewFileName - the file to write DOM out topublic static org.jdom.Element getJdomElement(Node node)
node - the DOM node to convertpublic static Document convertToDOM(org.jdom.Document jdomDoc)
jdomDoc - the jdoc document to convert to dom