data.exporters
Class ExporterXML

java.lang.Object
  extended by data.exporters.ExporterXML

public class ExporterXML
extends java.lang.Object

This class allow export Tree objects as XML files

Version:
1.0
Author:
Oscar Flores

Constructor Summary
ExporterXML()
           
 
Method Summary
static java.io.File writeXML(Tree t)
          Creates a temporal file containing the exported tree in XML format
private static void writeXML(TreeNode t, int level, Matrix mat, java.io.OutputStreamWriter out)
          Writes recursively all the tree nodes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExporterXML

public ExporterXML()
Method Detail

writeXML

public static java.io.File writeXML(Tree t)
                             throws DataException
Creates a temporal file containing the exported tree in XML format

Parameters:
t - Tree to export
Returns:
Temporal file with XML tree
Throws:
DataException

writeXML

private static void writeXML(TreeNode t,
                             int level,
                             Matrix mat,
                             java.io.OutputStreamWriter out)
                      throws java.io.IOException
Writes recursively all the tree nodes

Parameters:
t - Current TreeNode
level - Current identation level
mat - Reference Matrix
out - OutputStreamWriter of temp File
Throws:
java.io.IOException