Can someone please give me an example of using the storeToXML method in java, it's in the java.util.properties package heres the prinout from sun.java.com, but I can't figure out how to use it, i want to be able to save several options and then a values for the options in the xml.
storeToXML
public void storeToXML(OutputStream os,
String comment,
String encoding)
throws IOException
Emits an XML document representing all of the properties contained in this table, using the specified encoding.
The XML document will have the following DOCTYPE declaration:
<!DOCTYPE properties SYSTEM "
http://java.sun.com/dtd/properties.dtd">
If the specified comment is null then no comment will be stored in the document.
The specified stream remains open after this method returns.
Parameters:
os - the output stream on which to emit the XML document.
comment - a description of the property list, or null if no comment is desired.
Throws:
IOException - if writing to the specified output stream results in an IOException.
NullPointerException - if os is null, or if encoding is null.
Since:
1.5
See Also:
loadFromXML(InputStream)