Re: NSXML encoding question...
Re: NSXML encoding question...
- Subject: Re: NSXML encoding question...
- From: James Bucanek <email@hidden>
- Date: Sun, 26 Aug 2007 09:24:34 -0700
Martin Linklater <mailto:email@hidden> wrote (Sunday,
August 26, 2007 5:05 AM +0100):
<code>
addr = *PC + ( *(PC + 1) << 8);
</code>
As others have pointed out, it's '<'. XML entities have the
general form '&' <entity description> ';', where the description
can be the name of a named entity or a literal constant (i.e. '<').
However, if you want to encode literal data that may, or may
not, contain reserved XML characters it's easier to use a CDATA block:
<code>
<![CDATA[
addr = *PC + ( *(PC + 1) << 8); // & other
<code>crazy</code> stuff!
]]>
</code>
Everything between '<![CDATA[' and ']]>' is read as a literal
string of characters and is not interpreted as XML.
--
James Bucanek
_______________________________________________
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