Re: Escape xml with CFXMLCreateStringByEscapingEntities

2011-12-05 Thread Andreas Grosam
On Dec 1, 2011, at 9:19 AM, Claude Saelens wrote: Hello, I need to put XML fragments into another XML. Each time an XML fragment is put into another XML it needs to be escaped to be send to backend a java application. I used the function CFXMLCreateStringByEscapingEntities but it seems

Re: Escape xml with CFXMLCreateStringByEscapingEntities

2011-12-05 Thread Wim Lewis
On 4 Dec 2011, at 10:42 AM, Jens Alfke wrote: It looks like you’re trying to convert an NSString to a CFString through a whole bunch of conversions; but all this takes is a simple cast: For more information on this, by the way, check Toll-Free Bridging in the developer docs; instances of

Re: Escape xml with CFXMLCreateStringByEscapingEntities

2011-12-04 Thread Jens Alfke
On Dec 1, 2011, at 12:19 AM, Claude Saelens wrote: NSMutableString *aNSString = [NSMutableString stringWithString:xmlString]; CFStringRef aCFString; CFStringRef bCFString; aCFString = CFStringCreateWithCString(NULL, [aNSString UTF8String], NSUTF8StringEncoding);

Escape xml with CFXMLCreateStringByEscapingEntities

2011-12-01 Thread Claude Saelens
Hello, I need to put XML fragments into another XML. Each time an XML fragment is put into another XML it needs to be escaped to be send to backend a java application. I used the function CFXMLCreateStringByEscapingEntities but it seems it can only escape an XML fragment once, the second time