Re: with java - create, read from, write to preferences file
Re: with java - create, read from, write to preferences file
- Subject: Re: with java - create, read from, write to preferences file
- From: Chris Hanson <email@hidden>
- Date: Sun, 21 Dec 2003 11:01:17 -0600
On Dec 21, 2003, at 5:10 AM, Matthias Edrich wrote:
I want to have the application store the path to that
file in a preferences file (preferences file to be located in
the user's preferences folder).
Don't store paths on Mac OS X. Store an NSData containing an alias
record. My free BDAlias class makes this easy.
http://bdistributed.com/Projects/BDAlias/
How do I create a preferences file for my application
in the preferences folder if no such file exists?
[snip]
How do I read and write contents from and to this preferences file?
NSUserDefaults. You don't do anything with the file, you use a
higher-level API.
For example, I want to get the path to the XML file.
(I store that path within the preferences file)
Don't store paths. See above for BDAlias.
How do I parse an XML with Java? Are there any special
classes already available which help in getting content
from between XML tags?
Yes, about a billion. ;) There are a large number of XML parsing
frameworks for Java, some of which are included with Panther and Java
1.4.1. Sorry I can't name them off the top of my head, but I suggest
poking around in the documentation.
-- Chris
--
Chris Hanson <email@hidden>
Weblog:
http://www.livejournal.com/users/chanson/
Resume:
http://bdistributed.com/people/cmh/resume.html
Looking for work developing Java or Mac OS X applications
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.