Re: Newb Question: escaping quotes in a string
Re: Newb Question: escaping quotes in a string
- Subject: Re: Newb Question: escaping quotes in a string
- From: Ryan Britton <email@hidden>
- Date: Fri, 27 Jan 2006 14:46:02 -0800
Take a look at CFXMLCreateStringByEscapingEntities().
http://developer.apple.com/documentation/CoreFoundation/Reference/
CFXMLTreeRef/Reference/reference.html#//apple_ref/doc/uid/20001235-
CH1g-DontLinkElementID_2
On Jan 27, 2006, at 9:32 AM, lists wrote:
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
_______________________________________________
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