org.jscience.io
Interface XMLSerializable


public interface XMLSerializable

A class that implmements XMLSerializable can be written to an external target and later reinitialized using that target as a source. As the data is written in XML format, the exported data can be embedded in XML files that also contain other data.


Method Summary
 void exportXML(java.io.Writer out)
          exports the enire object as XML and writes it to the given Writer, so that the object can be reconstructed with importXML(InputSource).
 void importXML(org.xml.sax.InputSource source)
          The object is fully reinitialized with the XML data contained in the given ImputSource, so that the object has the same state as it had during export.
 

Method Detail

exportXML

void exportXML(java.io.Writer out)
               throws java.io.IOException
exports the enire object as XML and writes it to the given Writer, so that the object can be reconstructed with importXML(InputSource). The given Writer is neither flushed nor closed, so that other data may be effectively written to the InputSource after the method returned.

Throws:
java.io.IOException
See Also:
importXML(InputSource)

importXML

void importXML(org.xml.sax.InputSource source)
               throws org.xml.sax.SAXException,
                      java.io.IOException
The object is fully reinitialized with the XML data contained in the given ImputSource, so that the object has the same state as it had during export.

Throws:
org.xml.sax.SAXException
java.io.IOException
See Also:
exportXML(Writer)