load a Resource file template and search/replace a file

2008-05-19 Thread Wayne Shao
Hi, I would like to use some template (an XML file with some variables to be replaced) in my Resources. At run time, I would like to load it and replace the variables to produce a tmp file. Newbie questions: Are there any good examples on how I should do the following? - load the template from

Re: load a Resource file template and search/replace a file

2008-05-19 Thread Kyle Sluder
On Mon, May 19, 2008 at 3:28 AM, Wayne Shao <[EMAIL PROTECTED]> wrote: > Newbie questions: Are there any good examples on how I should do the > following? > > - load the template from resource file Read the documentation on NSBundle. > - search and replace the file to produce another file. Rea

Re: load a Resource file template and search/replace a file

2008-05-19 Thread Jens Alfke
On 19 May '08, at 4:49 AM, Kyle Sluder wrote: - load the template from resource file Read the documentation on NSBundle. Specifically, the -pathToResource... family of methods will give you absolute paths to files in your Resources directory. (NSBundle doesn't load the files for you, th

Re: load a Resource file template and search/replace a file

2008-05-19 Thread Nathan Kinsinger
On May 19, 2008, at 8:31 AM, Jens Alfke wrote: On 19 May '08, at 4:49 AM, Kyle Sluder wrote: - load the template from resource file Read the documentation on NSBundle. Specifically, the -pathToResource... family of methods will give you absolute paths to files in your Resources directo

Re: load a Resource file template and search/replace a file

2008-05-19 Thread Wayne Shao
Thanks all for the responses! Wayne On Mon, May 19, 2008 at 9:47 AM, Nathan Kinsinger <[EMAIL PROTECTED]> wrote: > > On May 19, 2008, at 8:31 AM, Jens Alfke wrote: > > >> On 19 May '08, at 4:49 AM, Kyle Sluder wrote: >> >> - load the template from resource file >>> >>> Read the documentatio