|
Java™ by example!
|
|
|
How do I export/import preferences data to/from XML?
You can export the whole preferences tree or just a node. Use exportSubtree (or exportNode to export a node without its descendants) and importPreferences. ExportPrefs.java:
Creates the file preferences.xml:
(the DTD for this XML can be found in the Preferences JavaDoc) You can import it back. ImportPrefs.java:
Further Information
Author of answer: Joris Van den Bogaert
Comments to this answer are only viewable by members. Login or become a member!
|
|
|
|
|