aspose file tools*
The moose likes Beginning Java and the fly likes Preferences.exportSubTree() does not export all xml nodes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Preferences.exportSubTree() does not export all xml nodes" Watch "Preferences.exportSubTree() does not export all xml nodes" New topic
Author

Preferences.exportSubTree() does not export all xml nodes

Jon Camilleri
Ranch Hand

Joined: Apr 25, 2008
Posts: 660

The following code should write information to a preferences file, that is expected to include left, top, width, height, and, title nodes, however, it does not seem to happen. Any idea how to update the code so that preferences are included within the preferences file exported from the File > Export Preferences option?


Source: Core Java Volume I (8th Edition) Listing 10-8 P. 546 to 549


preferences.xml - does not include nodes for left, top, width, height, and, title:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE preferences SYSTEM "http://java.sun.com/dtd/preferences.dtd">
<preferences EXTERNAL_XML_VERSION="1.0">
<root type="user">
<map/>
<node name="com">
<map/>
<node name="horstmann">
<map/>
<node name="corejava">
<map/>
</node>
</node>
</node>
</root>
</preferences>

"The actual storage of the data is dependent on the platform, e.g. under Windows the Windows Registry is used while under Linux a hidden file in the home directory of the user is used." Quoted from this article.

Does this code snippet save any entries in the Windows registry in my case? Can I look them up?

I am using Win XP SP3.


Jon
 
 
subject: Preferences.exportSubTree() does not export all xml nodes