• 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
load a Resource file template and search/replace a file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

load a Resource file template and search/replace a file


  • Subject: load a Resource file template and search/replace a file
  • From: "Wayne Shao" <email@hidden>
  • Date: Mon, 19 May 2008 00:28:29 -0700

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 resource file
  - search and replace the file to produce another file.
  - tmp file ( I know how to do this part).


My template file is an XML for a job description.  It has two variables to
be replaced. e.g, INPUT_PATH, OUT_DIR will be replaced with real path.

<xml ....
 <job>....
 ....
   <file_path>INPUT_PATH</file_path>
.....
   <output_dir>OUT_DIR</output_dir>
.....
</job>



Thanks,
--
Wayne Shao
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: load a Resource file template and search/replace a file
      • From: "Kyle Sluder" <email@hidden>
  • Prev by Date: Background Application.
  • Next by Date: Re: Cocoa et al as HCI usability problem
  • Previous by thread: Re: Background Application.
  • Next by thread: Re: load a Resource file template and search/replace a file
  • Index(es):
    • Date
    • Thread