writer2latex.xmerge
Class NewDOMDocument

java.lang.Object
  extended by writer2latex.xmerge.DOMDocument
      extended by writer2latex.xmerge.NewDOMDocument
All Implemented Interfaces:
OutputFile, Document

public class NewDOMDocument
extends DOMDocument

An extension of DOMDocument that overrides the write method. (This method fails with the version of xerces shipped with jre 1.5)


Constructor Summary
NewDOMDocument(java.lang.String sFileName, java.lang.String sExtension)
          Constructor
 
Method Summary
private  void write(org.w3c.dom.Node node, int nLevel, java.io.OutputStreamWriter osw)
           
 void write(java.io.OutputStream os)
          Write out content to the supplied OutputStream.
private  void write(java.lang.String s, java.io.OutputStreamWriter osw)
           
private  void writeAttributes(org.w3c.dom.Node node, java.io.OutputStreamWriter osw)
           
private  void writeSpaces(int nCount, java.io.OutputStreamWriter osw)
           
 
Methods inherited from class writer2latex.xmerge.DOMDocument
getContentDOM, getFileExtension, getFileName, getName, initContentDOM, read, setContentDOM
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NewDOMDocument

public NewDOMDocument(java.lang.String sFileName,
                      java.lang.String sExtension)
Constructor

Method Detail

write

public void write(java.io.OutputStream os)
           throws java.io.IOException
Write out content to the supplied OutputStream. (with pretty printing)

Specified by:
write in interface OutputFile
Overrides:
write in class DOMDocument
Parameters:
os - XML OutputStream.
Throws:
java.io.IOException - If any I/O error occurs.

write

private void write(org.w3c.dom.Node node,
                   int nLevel,
                   java.io.OutputStreamWriter osw)
            throws java.io.IOException
Throws:
java.io.IOException

writeAttributes

private void writeAttributes(org.w3c.dom.Node node,
                             java.io.OutputStreamWriter osw)
                      throws java.io.IOException
Throws:
java.io.IOException

writeSpaces

private void writeSpaces(int nCount,
                         java.io.OutputStreamWriter osw)
                  throws java.io.IOException
Throws:
java.io.IOException

write

private void write(java.lang.String s,
                   java.io.OutputStreamWriter osw)
            throws java.io.IOException
Throws:
java.io.IOException