|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface XMLizable
An object that implements this interface can be written to (and read from) an
XML element. This interface only specifies the writing to XML -- it is the
responsibility of the implementing class to take care of how the reading, and
subsequent instantiation, is handled. Typically it may be a constructor which
takes an Element
, or it may be a static method, e.g.
public static Object readXML(Element e)
.
Note that XMLizable
elements need not necessarily be saved to
an entire XML file -- that is what the XMLsaveable
subinterface is
for. For example, a Lexeme
implements XMLizable
but
not XMLsaveable
. It can be written as an element within an
XLMsaveable
object such as a CustomLexicon
.
XMLsaveable
Method Summary | |
---|---|
void |
writeXML(Writer out,
String indent)
This method writes the necessary information contained within an instance to an XML file. |
Method Detail |
---|
void writeXML(Writer out, String indent) throws IOException, XMLException
out
- The output stream for the XML file, which is assumed to be
already opened and writable.indent
- A string to be prepended before every line written by this
method. If passed appropriate white space, e.g.
XMLUtils.xmlIndent
, it can be used to control
indentation.
IOException
XMLException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |