• 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
Newb Question: escaping quotes in a string
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Newb Question: escaping quotes in a string


  • Subject: Newb Question: escaping quotes in a string
  • From: lists <email@hidden>
  • Date: Fri, 27 Jan 2006 12:32:18 -0500

I'm constructing some XML by hand from a dictionary object (the formatting is important) and I'm stumped on something that's super simple... how to escape quotes in a string that I'm placing in the attributes of the XML I'm crafting...

The closest I've come is this:

[[fooarray objectAtIndex:i] stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding]]

Which in some aspects is overzealous, as it encodes spaces, which is not a requirement for my XML, and in other aspects insufficient as it does not HTML encode entities such as ampersands... Doubtless, I'm barking up the wrong tree. Can someone point me in the right direction?

Thanks in advance!

- Stephen Caudill
_______________________________________________
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


  • Follow-Ups:
    • Re: Newb Question: escaping quotes in a string
      • From: Ryan Britton <email@hidden>
  • Prev by Date: Re: Pasting Across NSTextFields
  • Next by Date: Re: CFPreferences
  • Previous by thread: [Moderator] Cocoa and list resources
  • Next by thread: Re: Newb Question: escaping quotes in a string
  • Index(es):
    • Date
    • Thread