com.jme.util.export.xml
Class DOMSerializer

java.lang.Object
  extended by com.jme.util.export.xml.DOMSerializer

public class DOMSerializer
extends java.lang.Object

The DOMSerializer was based primarily off the DOMSerializer.java class from the "Java and XML" 3rd Edition book by Brett McLaughlin, and Justin Edelson. Some modifications were made to support formatting of elements and attributes.

Author:
Brett McLaughlin, Justin Edelson - Original creation for "Java and XML" book., Doug Daniels (dougnukem) - adjustments for XML formatting

Constructor Summary
DOMSerializer()
           
 
Method Summary
 void serialize(org.w3c.dom.Document doc, java.io.File file)
           
 void serialize(org.w3c.dom.Document doc, java.io.OutputStream out)
           
 void serialize(org.w3c.dom.Document doc, java.io.Writer writer)
           
 void setEncoding(java.lang.String encoding)
           
 void setIndent(int numSpaces)
           
 void setLineSeparator(java.lang.String lineSeparator)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DOMSerializer

public DOMSerializer()
Method Detail

setLineSeparator

public void setLineSeparator(java.lang.String lineSeparator)

setEncoding

public void setEncoding(java.lang.String encoding)

setIndent

public void setIndent(int numSpaces)

serialize

public void serialize(org.w3c.dom.Document doc,
                      java.io.OutputStream out)
               throws java.io.IOException
Throws:
java.io.IOException

serialize

public void serialize(org.w3c.dom.Document doc,
                      java.io.File file)
               throws java.io.IOException
Throws:
java.io.IOException

serialize

public void serialize(org.w3c.dom.Document doc,
                      java.io.Writer writer)
               throws java.io.IOException
Throws:
java.io.IOException