more than one plist in a file.
more than one plist in a file.
- Subject: more than one plist in a file.
- From: Paul Thomas <email@hidden>
- Date: Wed, 30 Nov 2005 19:56:45 +0000
Hi list,
I have an application that is logging events (date + string +
attributed string) to a file and I want to be able to read in the
file when I restart the app. I can't use a straight forward plist
(array of dictionary of {date,string,data}) because the files can get
large and I don't want to rewrite the entire file to append a single
event. So I am using a NSFileHandle to append the data and I don't
want to have to write my own encoding/decoding routines. Is there
anyway to reuse the plist architecture for this?
Writing a plist for every event using NSPropertyListSerialization
only half works because I can't find the start of the next plist when
it comes to reading the file back in. Plus it bloats the file somewhat.
Ideally, I'd like my log file to look like
...
<date>blah blah</date>
<string>bork bork</string>
...
and so on without the greater structure.
My only alternative seems to be to use the scanner.
Maybe I'm completely missing the point though?
Thanks,
Paul.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden