Re: NSXML and >
Re: NSXML and >
- Subject: Re: NSXML and >
- From: Keith Blount <email@hidden>
- Date: Tue, 9 Feb 2010 14:32:04 -0800 (PST)
Hi Jens,
Thanks for the reply. The XML specs seem to indicate it needs escaping when it occurs in "]]>" unless it marks the end of CDATA, regardless of whether it is inside CDATA or not:
The right angle bracket (>) may be represented using the string " > ", and must, for compatibility, be escaped using either " > " or a character reference when it appears in the string " ]]> " in content, when that string is not marking the end of a CDATA section.
Am I reading that wrong?
Many thanks,
Keith
----- Original Message ----
From: Jens Alfke <email@hidden>
To: Keith Blount <email@hidden>
Cc: glenn andreas <email@hidden>; "email@hidden" <email@hidden>
Sent: Tue, February 9, 2010 9:37:46 PM
Subject: Re: NSXML and >
On Feb 9, 2010, at 1:03 PM, Keith Blount wrote:
> Great, many thanks for the reply, and for the location of the information in the XML docs, that's very helpful. Unfortunately, it seems that the NSXML classes don't fix the '>' in the ']]>' case either, though:
> NSXMLElement*element = [[[NSXMLElementalloc] initWithName:@"Test"stringValue:@"< & > ]]>"] autorelease];
> NSLog (@"%@", element);
The ">" in "]]>" only needs to be escaped when it's inside a CDATA, I believe. (Since that string marks the end of a CDATA.)
—Jens
_______________________________________________
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