<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_71) on Wed Sep 09 14:31:30 NZST 2015 -->
<title>XMLSerialization</title>
<meta name="date" content="2015-09-09">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="XMLSerialization";
    }
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!--   -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../weka/core/xml/XMLOptions.html" title="class in weka.core.xml"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../weka/core/xml/XMLSerializationMethodHandler.html" title="class in weka.core.xml"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?weka/core/xml/XMLSerialization.html" target="_top">Frames</a></li>
<li><a href="XMLSerialization.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">weka.core.xml</div>
<h2 title="Class XMLSerialization" class="title">Class XMLSerialization</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>weka.core.xml.XMLSerialization</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="../../../weka/core/RevisionHandler.html" title="interface in weka.core">RevisionHandler</a></dd>
</dl>
<dl>
<dt>Direct Known Subclasses:</dt>
<dd><a href="../../../weka/core/xml/XMLBasicSerialization.html" title="class in weka.core.xml">XMLBasicSerialization</a></dd>
</dl>
<hr>
<br>
<pre>public class <span class="strong">XMLSerialization</span>
extends java.lang.Object
implements <a href="../../../weka/core/RevisionHandler.html" title="interface in weka.core">RevisionHandler</a></pre>
<div class="block">With this class objects can be serialized to XML instead into a binary 
 format. It uses introspection (cf. beans) to retrieve the data from the
 given object, i.e. it can only access beans-conform fields automatically.
 <p>
 The generic approach of writing data as XML can be overriden by adding 
 custom methods for reading/writing in a derived class
 (cf. <code>m_Properties</code>, <code>m_CustomMethods</code>).<br>
 Custom read and write methods must have the same signature (and also be 
 <code>public</code>!) as the <code>readFromXML</code> and <code>writeToXML</code>
 methods. Methods that apply to the naming rule <code>read + property name</code>
 are added automatically to the list of methods by the method 
 <code>XMLSerializationMethodHandler.addMethods(...)</code>.  
 <p>
 Other properties that are not conform the bean set/get-methods have to be 
 processed manually in a derived class (cf. <code>readPostProcess(Object)</code>, 
 <code>writePostProcess(Object)</code>).
 <p>
 For a complete XML serialization/deserialization have a look at the 
 <code>KOML</code> class.
 <p>
 If a stored class has a constructor that takes a String to initialize
 (e.g. String or Double) then the content of the tag will used for the
 constructor, e.g. from 
 <pre>&lt;object name="name" class="String" primitive="no"&gt;Smith&lt;/object&gt;</pre>
 "Smith" will be used to instantiate a String object as constructor argument.
 <p></div>
<dl><dt><span class="strong">Version:</span></dt>
  <dd>$Revision: 1.16 $</dd>
<dt><span class="strong">Author:</span></dt>
  <dd>FracPete (fracpete at waikato dot ac dot nz)</dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="../../../weka/core/xml/KOML.html" title="class in weka.core.xml"><code>KOML</code></a>, 
<a href="../../../weka/core/xml/XMLSerialization.html#fromXML(org.w3c.dom.Document)"><code>fromXML(Document)</code></a>, 
<a href="../../../weka/core/xml/XMLSerialization.html#toXML(java.lang.Object)"><code>toXML(Object)</code></a>, 
<a href="../../../weka/core/xml/XMLSerialization.html#m_Properties"><code>m_Properties</code></a>, 
<a href="../../../weka/core/xml/XMLSerialization.html#m_CustomMethods"><code>m_CustomMethods</code></a>, 
<a href="../../../weka/core/xml/XMLSerialization.html#readPostProcess(java.lang.Object)"><code>readPostProcess(Object)</code></a>, 
<a href="../../../weka/core/xml/XMLSerialization.html#writePostProcess(java.lang.Object)"><code>writePostProcess(Object)</code></a>, 
<a href="../../../weka/core/xml/XMLSerialization.html#readFromXML(org.w3c.dom.Element)"><code>readFromXML(Element)</code></a>, 
<a href="../../../weka/core/xml/XMLSerialization.html#writeToXML(org.w3c.dom.Element,%20java.lang.Object,%20java.lang.String)"><code>writeToXML(Element, Object, String)</code></a></dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_summary">
<!--   -->
</a>
<h3>Field Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../weka/core/xml/XMLSerialization.html#ATT_ARRAY">ATT_ARRAY</a></strong></code>
<div class="block">the tag whether array or not (yes/no)</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../weka/core/xml/XMLSerialization.html#ATT_ARRAY_DEFAULT">ATT_ARRAY_DEFAULT</a></strong></code>
<div class="block">default value for attribute ATT_ARRAY</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../weka/core/xml/XMLSerialization.html#ATT_CLASS">ATT_CLASS</a></strong></code>
<div class="block">the tag for the class</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../weka/core/xml/XMLSerialization.html#ATT_NAME">ATT_NAME</a></strong></code>
<div class="block">the tag for the name</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../weka/core/xml/XMLSerialization.html#ATT_NULL">ATT_NULL</a></strong></code>
<div class="block">the tag whether null or not (yes/no)</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../weka/core/xml/XMLSerialization.html#ATT_NULL_DEFAULT">ATT_NULL_DEFAULT</a></strong></code>
<div class="block">default value for attribute ATT_NULL</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../weka/core/xml/XMLSerialization.html#ATT_PRIMITIVE">ATT_PRIMITIVE</a></strong></code>
<div class="block">the tag whether primitive or not (yes/no)</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../weka/core/xml/XMLSerialization.html#ATT_PRIMITIVE_DEFAULT">ATT_PRIMITIVE_DEFAULT</a></strong></code>
<div class="block">default value for attribute ATT_PRIMITIVE</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../weka/core/xml/XMLSerialization.html#ATT_VERSION">ATT_VERSION</a></strong></code>
<div class="block">the version attribute</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../weka/core/xml/XMLSerialization.html#DOCTYPE">DOCTYPE</a></strong></code>
<div class="block">the DOCTYPE for the serialization</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../weka/core/xml/XMLSerialization.html#ROOT_NODE">ROOT_NODE</a></strong></code>
<div class="block">the root node of the XML document</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../weka/core/xml/XMLSerialization.html#TAG_OBJECT">TAG_OBJECT</a></strong></code>
<div class="block">the tag for an object</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../weka/core/xml/XMLSerialization.html#VAL_NO">VAL_NO</a></strong></code>
<div class="block">the value "no" for the primitive and array attribute</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../weka/core/xml/XMLSerialization.html#VAL_ROOT">VAL_ROOT</a></strong></code>
<div class="block">the value of the name for the root node</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../weka/core/xml/XMLSerialization.html#VAL_YES">VAL_YES</a></strong></code>
<div class="block">the value "yes" for the primitive and array attribute</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!--   -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../weka/core/xml/XMLSerialization.html#XMLSerialization()">XMLSerialization</a></strong>()</code>
<div class="block">initializes the serialization</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../weka/core/xml/XMLSerialization.html#clear()">clear</a></strong>()</code>
<div class="block">generates internally a new XML document and clears also the IgnoreList and
 the mappings for the Read/Write-Methods</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>java.lang.Object</code></td>
<td class="colLast"><code><strong><a href="../../../weka/core/xml/XMLSerialization.html#fromXML(org.w3c.dom.Document)">fromXML</a></strong>(org.w3c.dom.Document&nbsp;document)</code>
<div class="block">returns the given DOM document as an instance of the specified class</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../weka/core/xml/XMLSerialization.html#getRevision()">getRevision</a></strong>()</code>
<div class="block">Returns the revision string.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../weka/core/xml/XMLSerialization.html#getVersion()">getVersion</a></strong>()</code>
<div class="block">returns the WEKA version with which the serialized object was created</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../weka/core/xml/XMLSerialization.html#main(java.lang.String[])">main</a></strong>(java.lang.String[]&nbsp;args)</code>
<div class="block">for testing only.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>java.lang.Object</code></td>
<td class="colLast"><code><strong><a href="../../../weka/core/xml/XMLSerialization.html#read(java.io.File)">read</a></strong>(java.io.File&nbsp;file)</code>
<div class="block">parses the given file and returns a DOM document</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>java.lang.Object</code></td>
<td class="colLast"><code><strong><a href="../../../weka/core/xml/XMLSerialization.html#read(java.io.InputStream)">read</a></strong>(java.io.InputStream&nbsp;stream)</code>
<div class="block">parses the given stream and returns a DOM document</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>java.lang.Object</code></td>
<td class="colLast"><code><strong><a href="../../../weka/core/xml/XMLSerialization.html#read(java.io.Reader)">read</a></strong>(java.io.Reader&nbsp;reader)</code>
<div class="block">parses the given reader and returns a DOM document</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>java.lang.Object</code></td>
<td class="colLast"><code><strong><a href="../../../weka/core/xml/XMLSerialization.html#read(java.lang.String)">read</a></strong>(java.lang.String&nbsp;xml)</code>
<div class="block">parses the given XML string (can be XML or a filename) and returns an
 Object generated from the representation</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../weka/core/xml/XMLSerialization.html#readBooleanFromXML(org.w3c.dom.Element)">readBooleanFromXML</a></strong>(org.w3c.dom.Element&nbsp;node)</code>
<div class="block">builds the primitive from the given DOM node.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>byte</code></td>
<td class="colLast"><code><strong><a href="../../../weka/core/xml/XMLSerialization.html#readByteFromXML(org.w3c.dom.Element)">readByteFromXML</a></strong>(org.w3c.dom.Element&nbsp;node)</code>
<div class="block">builds the primitive from the given DOM node.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>char</code></td>
<td class="colLast"><code><strong><a href="../../../weka/core/xml/XMLSerialization.html#readCharFromXML(org.w3c.dom.Element)">readCharFromXML</a></strong>(org.w3c.dom.Element&nbsp;node)</code>
<div class="block">builds the primitive from the given DOM node.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>double</code></td>
<td class="colLast"><code><strong><a href="../../../weka/core/xml/XMLSerialization.html#readDoubleFromXML(org.w3c.dom.Element)">readDoubleFromXML</a></strong>(org.w3c.dom.Element&nbsp;node)</code>
<div class="block">builds the primitive from the given DOM node.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>float</code></td>
<td class="colLast"><code><strong><a href="../../../weka/core/xml/XMLSerialization.html#readFloatFromXML(org.w3c.dom.Element)">readFloatFromXML</a></strong>(org.w3c.dom.Element&nbsp;node)</code>
<div class="block">builds the primitive from the given DOM node.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>java.lang.Object</code></td>
<td class="colLast"><code><strong><a href="../../../weka/core/xml/XMLSerialization.html#readFromXML(org.w3c.dom.Element)">readFromXML</a></strong>(org.w3c.dom.Element&nbsp;node)</code>
<div class="block">builds the object from the given DOM node.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>java.lang.Object</code></td>
<td class="colLast"><code><strong><a href="../../../weka/core/xml/XMLSerialization.html#readFromXML(java.lang.Object,%20java.lang.String,%20org.w3c.dom.Element)">readFromXML</a></strong>(java.lang.Object&nbsp;o,
           java.lang.String&nbsp;name,
           org.w3c.dom.Element&nbsp;child)</code>
<div class="block">adds the specific node to the object via a set method</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../weka/core/xml/XMLSerialization.html#readIntFromXML(org.w3c.dom.Element)">readIntFromXML</a></strong>(org.w3c.dom.Element&nbsp;node)</code>
<div class="block">builds the primitive from the given DOM node.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><strong><a href="../../../weka/core/xml/XMLSerialization.html#readLongFromXML(org.w3c.dom.Element)">readLongFromXML</a></strong>(org.w3c.dom.Element&nbsp;node)</code>
<div class="block">builds the primitive from the given DOM node.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>short</code></td>
<td class="colLast"><code><strong><a href="../../../weka/core/xml/XMLSerialization.html#readShortFromXML(org.w3c.dom.Element)">readShortFromXML</a></strong>(org.w3c.dom.Element&nbsp;node)</code>
<div class="block">builds the primitive from the given DOM node.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../weka/core/xml/XMLDocument.html" title="class in weka.core.xml">XMLDocument</a></code></td>
<td class="colLast"><code><strong><a href="../../../weka/core/xml/XMLSerialization.html#toXML(java.lang.Object)">toXML</a></strong>(java.lang.Object&nbsp;o)</code>
<div class="block">extracts all accesible properties from the given object</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../weka/core/xml/XMLSerialization.html#write(java.io.File,%20java.lang.Object)">write</a></strong>(java.io.File&nbsp;file,
     java.lang.Object&nbsp;o)</code>
<div class="block">writes the given object into the file</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../weka/core/xml/XMLSerialization.html#write(java.io.OutputStream,%20java.lang.Object)">write</a></strong>(java.io.OutputStream&nbsp;stream,
     java.lang.Object&nbsp;o)</code>
<div class="block">writes the given object into the stream</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../weka/core/xml/XMLSerialization.html#write(java.lang.String,%20java.lang.Object)">write</a></strong>(java.lang.String&nbsp;file,
     java.lang.Object&nbsp;o)</code>
<div class="block">writes the given object into the file</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../weka/core/xml/XMLSerialization.html#write(java.io.Writer,%20java.lang.Object)">write</a></strong>(java.io.Writer&nbsp;writer,
     java.lang.Object&nbsp;o)</code>
<div class="block">writes the given object into the writer</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>org.w3c.dom.Element</code></td>
<td class="colLast"><code><strong><a href="../../../weka/core/xml/XMLSerialization.html#writeToXML(org.w3c.dom.Element,%20java.lang.Object,%20java.lang.String)">writeToXML</a></strong>(org.w3c.dom.Element&nbsp;parent,
          java.lang.Object&nbsp;o,
          java.lang.String&nbsp;name)</code>
<div class="block">adds the given Object to a DOM structure.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_detail">
<!--   -->
</a>
<h3>Field Detail</h3>
<a name="TAG_OBJECT">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>TAG_OBJECT</h4>
<pre>public static final&nbsp;java.lang.String TAG_OBJECT</pre>
<div class="block">the tag for an object</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#weka.core.xml.XMLSerialization.TAG_OBJECT">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="ATT_VERSION">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ATT_VERSION</h4>
<pre>public static final&nbsp;java.lang.String ATT_VERSION</pre>
<div class="block">the version attribute</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#weka.core.xml.XMLSerialization.ATT_VERSION">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="ATT_NAME">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ATT_NAME</h4>
<pre>public static final&nbsp;java.lang.String ATT_NAME</pre>
<div class="block">the tag for the name</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#weka.core.xml.XMLSerialization.ATT_NAME">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="ATT_CLASS">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ATT_CLASS</h4>
<pre>public static final&nbsp;java.lang.String ATT_CLASS</pre>
<div class="block">the tag for the class</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#weka.core.xml.XMLSerialization.ATT_CLASS">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="ATT_PRIMITIVE">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ATT_PRIMITIVE</h4>
<pre>public static final&nbsp;java.lang.String ATT_PRIMITIVE</pre>
<div class="block">the tag whether primitive or not (yes/no)</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#weka.core.xml.XMLSerialization.ATT_PRIMITIVE">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="ATT_ARRAY">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ATT_ARRAY</h4>
<pre>public static final&nbsp;java.lang.String ATT_ARRAY</pre>
<div class="block">the tag whether array or not (yes/no)</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#weka.core.xml.XMLSerialization.ATT_ARRAY">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="ATT_NULL">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ATT_NULL</h4>
<pre>public static final&nbsp;java.lang.String ATT_NULL</pre>
<div class="block">the tag whether null or not (yes/no)</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#weka.core.xml.XMLSerialization.ATT_NULL">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="VAL_YES">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>VAL_YES</h4>
<pre>public static final&nbsp;java.lang.String VAL_YES</pre>
<div class="block">the value "yes" for the primitive and array attribute</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#weka.core.xml.XMLSerialization.VAL_YES">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="VAL_NO">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>VAL_NO</h4>
<pre>public static final&nbsp;java.lang.String VAL_NO</pre>
<div class="block">the value "no" for the primitive and array attribute</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#weka.core.xml.XMLSerialization.VAL_NO">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="VAL_ROOT">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>VAL_ROOT</h4>
<pre>public static final&nbsp;java.lang.String VAL_ROOT</pre>
<div class="block">the value of the name for the root node</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#weka.core.xml.XMLSerialization.VAL_ROOT">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="ROOT_NODE">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ROOT_NODE</h4>
<pre>public static final&nbsp;java.lang.String ROOT_NODE</pre>
<div class="block">the root node of the XML document</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#weka.core.xml.XMLSerialization.ROOT_NODE">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="ATT_PRIMITIVE_DEFAULT">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ATT_PRIMITIVE_DEFAULT</h4>
<pre>public static final&nbsp;java.lang.String ATT_PRIMITIVE_DEFAULT</pre>
<div class="block">default value for attribute ATT_PRIMITIVE</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../weka/core/xml/XMLSerialization.html#ATT_PRIMITIVE"><code>ATT_PRIMITIVE</code></a>, 
<a href="../../../constant-values.html#weka.core.xml.XMLSerialization.ATT_PRIMITIVE_DEFAULT">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="ATT_ARRAY_DEFAULT">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ATT_ARRAY_DEFAULT</h4>
<pre>public static final&nbsp;java.lang.String ATT_ARRAY_DEFAULT</pre>
<div class="block">default value for attribute ATT_ARRAY</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../weka/core/xml/XMLSerialization.html#ATT_ARRAY"><code>ATT_ARRAY</code></a>, 
<a href="../../../constant-values.html#weka.core.xml.XMLSerialization.ATT_ARRAY_DEFAULT">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="ATT_NULL_DEFAULT">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ATT_NULL_DEFAULT</h4>
<pre>public static final&nbsp;java.lang.String ATT_NULL_DEFAULT</pre>
<div class="block">default value for attribute ATT_NULL</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../weka/core/xml/XMLSerialization.html#ATT_NULL"><code>ATT_NULL</code></a>, 
<a href="../../../constant-values.html#weka.core.xml.XMLSerialization.ATT_NULL_DEFAULT">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="DOCTYPE">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DOCTYPE</h4>
<pre>public static final&nbsp;java.lang.String DOCTYPE</pre>
<div class="block">the DOCTYPE for the serialization</div>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!--   -->
</a>
<h3>Constructor Detail</h3>
<a name="XMLSerialization()">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>XMLSerialization</h4>
<pre>public&nbsp;XMLSerialization()
                 throws java.lang.Exception</pre>
<div class="block">initializes the serialization</div>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.Exception</code> - if initialization fails</dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a name="clear()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>clear</h4>
<pre>public&nbsp;void&nbsp;clear()
           throws java.lang.Exception</pre>
<div class="block">generates internally a new XML document and clears also the IgnoreList and
 the mappings for the Read/Write-Methods</div>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.Exception</code> - if something goes wrong</dd></dl>
</li>
</ul>
<a name="getVersion()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getVersion</h4>
<pre>public&nbsp;java.lang.String&nbsp;getVersion()</pre>
<div class="block">returns the WEKA version with which the serialized object was created</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the current version</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../weka/core/Version.html" title="class in weka.core"><code>Version</code></a></dd></dl>
</li>
</ul>
<a name="writeToXML(org.w3c.dom.Element, java.lang.Object, java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeToXML</h4>
<pre>public&nbsp;org.w3c.dom.Element&nbsp;writeToXML(org.w3c.dom.Element&nbsp;parent,
                             java.lang.Object&nbsp;o,
                             java.lang.String&nbsp;name)
                               throws java.lang.Exception</pre>
<div class="block">adds the given Object to a DOM structure. 
 (only public due to reflection).<br>
 <b>Note:</b> <code>overrideClassname(Object)</code> is not invoked in case of
 arrays, since the array class could be a superclass, whereas the elements of
 the array can be specialized subclasses. In case of an array the method 
 <code>overrideClassname(String)</code> is invoked, which searches for an 
 exact match of the classname in the override hashtable.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>parent</code> - the parent of this object, e.g. the class this object is a member of</dd><dd><code>o</code> - the Object to describe in XML</dd><dd><code>name</code> - the name of the object</dd>
<dt><span class="strong">Returns:</span></dt><dd>the node that was created</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.Exception</code> - if the DOM creation fails</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../weka/core/xml/XMLSerialization.html#overrideClassname(java.lang.Object)"><code>overrideClassname(Object)</code></a>, 
<a href="../../../weka/core/xml/XMLSerialization.html#overrideClassname(java.lang.String)"><code>overrideClassname(String)</code></a>, 
<a href="../../../weka/core/xml/XMLSerialization.html#m_ClassnameOverride"><code>m_ClassnameOverride</code></a></dd></dl>
</li>
</ul>
<a name="toXML(java.lang.Object)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toXML</h4>
<pre>public&nbsp;<a href="../../../weka/core/xml/XMLDocument.html" title="class in weka.core.xml">XMLDocument</a>&nbsp;toXML(java.lang.Object&nbsp;o)
                  throws java.lang.Exception</pre>
<div class="block">extracts all accesible properties from the given object</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>o</code> - the object to turn into an XML representation</dd>
<dt><span class="strong">Returns:</span></dt><dd>the generated DOM document</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.Exception</code> - if XML generation fails</dd></dl>
</li>
</ul>
<a name="readBooleanFromXML(org.w3c.dom.Element)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readBooleanFromXML</h4>
<pre>public&nbsp;boolean&nbsp;readBooleanFromXML(org.w3c.dom.Element&nbsp;node)
                           throws java.lang.Exception</pre>
<div class="block">builds the primitive from the given DOM node.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>node</code> - the associated XML node</dd>
<dt><span class="strong">Returns:</span></dt><dd>the primitive created from the XML description</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.Exception</code> - if instantiation fails</dd></dl>
</li>
</ul>
<a name="readByteFromXML(org.w3c.dom.Element)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readByteFromXML</h4>
<pre>public&nbsp;byte&nbsp;readByteFromXML(org.w3c.dom.Element&nbsp;node)
                     throws java.lang.Exception</pre>
<div class="block">builds the primitive from the given DOM node.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>node</code> - the associated XML node</dd>
<dt><span class="strong">Returns:</span></dt><dd>the primitive created from the XML description</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.Exception</code> - if instantiation fails</dd></dl>
</li>
</ul>
<a name="readCharFromXML(org.w3c.dom.Element)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readCharFromXML</h4>
<pre>public&nbsp;char&nbsp;readCharFromXML(org.w3c.dom.Element&nbsp;node)
                     throws java.lang.Exception</pre>
<div class="block">builds the primitive from the given DOM node.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>node</code> - the associated XML node</dd>
<dt><span class="strong">Returns:</span></dt><dd>the primitive created from the XML description</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.Exception</code> - if instantiation fails</dd></dl>
</li>
</ul>
<a name="readDoubleFromXML(org.w3c.dom.Element)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readDoubleFromXML</h4>
<pre>public&nbsp;double&nbsp;readDoubleFromXML(org.w3c.dom.Element&nbsp;node)
                         throws java.lang.Exception</pre>
<div class="block">builds the primitive from the given DOM node.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>node</code> - the associated XML node</dd>
<dt><span class="strong">Returns:</span></dt><dd>the primitive created from the XML description</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.Exception</code> - if instantiation fails</dd></dl>
</li>
</ul>
<a name="readFloatFromXML(org.w3c.dom.Element)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readFloatFromXML</h4>
<pre>public&nbsp;float&nbsp;readFloatFromXML(org.w3c.dom.Element&nbsp;node)
                       throws java.lang.Exception</pre>
<div class="block">builds the primitive from the given DOM node.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>node</code> - the associated XML node</dd>
<dt><span class="strong">Returns:</span></dt><dd>the primitive created from the XML description</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.Exception</code> - if instantiation fails</dd></dl>
</li>
</ul>
<a name="readIntFromXML(org.w3c.dom.Element)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readIntFromXML</h4>
<pre>public&nbsp;int&nbsp;readIntFromXML(org.w3c.dom.Element&nbsp;node)
                   throws java.lang.Exception</pre>
<div class="block">builds the primitive from the given DOM node.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>node</code> - the associated XML node</dd>
<dt><span class="strong">Returns:</span></dt><dd>the primitive created from the XML description</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.Exception</code> - if instantiation fails</dd></dl>
</li>
</ul>
<a name="readLongFromXML(org.w3c.dom.Element)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readLongFromXML</h4>
<pre>public&nbsp;long&nbsp;readLongFromXML(org.w3c.dom.Element&nbsp;node)
                     throws java.lang.Exception</pre>
<div class="block">builds the primitive from the given DOM node.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>node</code> - the associated XML node</dd>
<dt><span class="strong">Returns:</span></dt><dd>the primitive created from the XML description</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.Exception</code> - if instantiation fails</dd></dl>
</li>
</ul>
<a name="readShortFromXML(org.w3c.dom.Element)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readShortFromXML</h4>
<pre>public&nbsp;short&nbsp;readShortFromXML(org.w3c.dom.Element&nbsp;node)
                       throws java.lang.Exception</pre>
<div class="block">builds the primitive from the given DOM node.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>node</code> - the associated XML node</dd>
<dt><span class="strong">Returns:</span></dt><dd>the primitive created from the XML description</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.Exception</code> - if instantiation fails</dd></dl>
</li>
</ul>
<a name="readFromXML(java.lang.Object, java.lang.String, org.w3c.dom.Element)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readFromXML</h4>
<pre>public&nbsp;java.lang.Object&nbsp;readFromXML(java.lang.Object&nbsp;o,
                           java.lang.String&nbsp;name,
                           org.w3c.dom.Element&nbsp;child)
                             throws java.lang.Exception</pre>
<div class="block">adds the specific node to the object via a set method</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>o</code> - the object to set a property</dd><dd><code>name</code> - the name of the object for which to set a property
                     (only for information reasons)</dd><dd><code>child</code> - the value of the property to add</dd>
<dt><span class="strong">Returns:</span></dt><dd>the provided object, but augmented by the child</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.Exception</code> - if something goes wrong</dd></dl>
</li>
</ul>
<a name="readFromXML(org.w3c.dom.Element)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readFromXML</h4>
<pre>public&nbsp;java.lang.Object&nbsp;readFromXML(org.w3c.dom.Element&nbsp;node)
                             throws java.lang.Exception</pre>
<div class="block">builds the object from the given DOM node. 
 (only public due to reflection)</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>node</code> - the associated XML node</dd>
<dt><span class="strong">Returns:</span></dt><dd>the instance created from the XML description</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.Exception</code> - if instantiation fails</dd></dl>
</li>
</ul>
<a name="fromXML(org.w3c.dom.Document)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>fromXML</h4>
<pre>public&nbsp;java.lang.Object&nbsp;fromXML(org.w3c.dom.Document&nbsp;document)
                         throws java.lang.Exception</pre>
<div class="block">returns the given DOM document as an instance of the specified class</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>document</code> - the parsed DOM document representing the object</dd>
<dt><span class="strong">Returns:</span></dt><dd>the XML as object</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.Exception</code> - if object instantiation fails</dd></dl>
</li>
</ul>
<a name="read(java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>read</h4>
<pre>public&nbsp;java.lang.Object&nbsp;read(java.lang.String&nbsp;xml)
                      throws java.lang.Exception</pre>
<div class="block">parses the given XML string (can be XML or a filename) and returns an
 Object generated from the representation</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>xml</code> - the xml to parse (if "<?xml" is not found then it is considered a file)</dd>
<dt><span class="strong">Returns:</span></dt><dd>the generated instance</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.Exception</code> - if something goes wrong with the parsing</dd></dl>
</li>
</ul>
<a name="read(java.io.File)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>read</h4>
<pre>public&nbsp;java.lang.Object&nbsp;read(java.io.File&nbsp;file)
                      throws java.lang.Exception</pre>
<div class="block">parses the given file and returns a DOM document</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>file</code> - the XML file to parse</dd>
<dt><span class="strong">Returns:</span></dt><dd>the parsed DOM document</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.Exception</code> - if something goes wrong with the parsing</dd></dl>
</li>
</ul>
<a name="read(java.io.InputStream)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>read</h4>
<pre>public&nbsp;java.lang.Object&nbsp;read(java.io.InputStream&nbsp;stream)
                      throws java.lang.Exception</pre>
<div class="block">parses the given stream and returns a DOM document</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>stream</code> - the XML stream to parse</dd>
<dt><span class="strong">Returns:</span></dt><dd>the parsed DOM document</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.Exception</code> - if something goes wrong with the parsing</dd></dl>
</li>
</ul>
<a name="read(java.io.Reader)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>read</h4>
<pre>public&nbsp;java.lang.Object&nbsp;read(java.io.Reader&nbsp;reader)
                      throws java.lang.Exception</pre>
<div class="block">parses the given reader and returns a DOM document</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>reader</code> - the XML reader to parse</dd>
<dt><span class="strong">Returns:</span></dt><dd>the parsed DOM document</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.Exception</code> - if something goes wrong with the parsing</dd></dl>
</li>
</ul>
<a name="write(java.lang.String, java.lang.Object)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>write</h4>
<pre>public&nbsp;void&nbsp;write(java.lang.String&nbsp;file,
         java.lang.Object&nbsp;o)
           throws java.lang.Exception</pre>
<div class="block">writes the given object into the file</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>file</code> - the filename to write to</dd><dd><code>o</code> - the object to serialize as XML</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.Exception</code> - if something goes wrong with the parsing</dd></dl>
</li>
</ul>
<a name="write(java.io.File, java.lang.Object)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>write</h4>
<pre>public&nbsp;void&nbsp;write(java.io.File&nbsp;file,
         java.lang.Object&nbsp;o)
           throws java.lang.Exception</pre>
<div class="block">writes the given object into the file</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>file</code> - the filename to write to</dd><dd><code>o</code> - the object to serialize as XML</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.Exception</code> - if something goes wrong with the parsing</dd></dl>
</li>
</ul>
<a name="write(java.io.OutputStream, java.lang.Object)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>write</h4>
<pre>public&nbsp;void&nbsp;write(java.io.OutputStream&nbsp;stream,
         java.lang.Object&nbsp;o)
           throws java.lang.Exception</pre>
<div class="block">writes the given object into the stream</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>stream</code> - the filename to write to</dd><dd><code>o</code> - the object to serialize as XML</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.Exception</code> - if something goes wrong with the parsing</dd></dl>
</li>
</ul>
<a name="write(java.io.Writer, java.lang.Object)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>write</h4>
<pre>public&nbsp;void&nbsp;write(java.io.Writer&nbsp;writer,
         java.lang.Object&nbsp;o)
           throws java.lang.Exception</pre>
<div class="block">writes the given object into the writer</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>writer</code> - the filename to write to</dd><dd><code>o</code> - the object to serialize as XML</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.Exception</code> - if something goes wrong with the parsing</dd></dl>
</li>
</ul>
<a name="main(java.lang.String[])">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>main</h4>
<pre>public static&nbsp;void&nbsp;main(java.lang.String[]&nbsp;args)
                 throws java.lang.Exception</pre>
<div class="block">for testing only. if the first argument is a filename with ".xml"
 as extension it tries to generate an instance from the XML description
 and does a <code>toString()</code> of the generated object.</div>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.Exception</code></dd></dl>
</li>
</ul>
<a name="getRevision()">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getRevision</h4>
<pre>public&nbsp;java.lang.String&nbsp;getRevision()</pre>
<div class="block">Returns the revision string.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../weka/core/RevisionHandler.html#getRevision()">getRevision</a></code>&nbsp;in interface&nbsp;<code><a href="../../../weka/core/RevisionHandler.html" title="interface in weka.core">RevisionHandler</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>the revision</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!--   -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../weka/core/xml/XMLOptions.html" title="class in weka.core.xml"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../weka/core/xml/XMLSerializationMethodHandler.html" title="class in weka.core.xml"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?weka/core/xml/XMLSerialization.html" target="_top">Frames</a></li>
<li><a href="XMLSerialization.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
