• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: java - reading and writing preferences
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: java - reading and writing preferences


  • Subject: Re: java - reading and writing preferences
  • From: Nick Zitzmann <email@hidden>
  • Date: Thu, 22 Apr 2004 07:49:27 -0600

On Apr 22, 2004, at 7:30 AM, Frank Ribitch wrote:

I have a plist file that i need to read from. Its generated as the output of
"system_profiler -xml -detailLevel -1 > output.plist"

The data is stored different than past projects that I have worked with. My app had all values between a single <dict> tag. The system profiler file has nested arrays, so there are several <dict> tags in the file. How do I read this type of file?

I'm not sure about Java, but in Objective-C, you'd do this:

NSArray *data = [NSArray arrayWithContentsOfFile:@"/Path/To/output.plist"];

Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
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.


References: 
 >java - reading and writing preferences (From: Frank Ribitch <email@hidden>)

  • Prev by Date: java - reading and writing preferences
  • Next by Date: Re: java - reading and writing preferences
  • Previous by thread: java - reading and writing preferences
  • Next by thread: Re: java - reading and writing preferences
  • Index(es):
    • Date
    • Thread