Re: Need to escape ]]>
- From: DC <dc@xxxxxxxxx>
- Date: Wed, 19 Sep 2007 00:53:46 -0700
On 18 Sep., 19:10, Martin Honnen <mahotr...@xxxxxxxx> wrote:
DC wrote:
I have to somehow place this fragment into a CDATA block: ]]>
Example:
<replace><![CDATA[]]></text>]]></replace>
Of course that does not work since the first ]]> will close the CDATA
You need to break that up into two CDATA sections e.g.
<replace><![CDATA[]]]]><![CDATA[></text>]]></replace>
XmlWriter can free you from such hassles by using the WriteCData method
e.g. the above will be created by
writer.WriteStartElement("replace");
writer.WriteCData("]]></text>");
writer.WriteEndElement();
--
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Perfect, thank you Martin!
Regards
DC
.
- References:
- Need to escape ]]>
- From: DC
- Re: Need to escape ]]>
- From: Martin Honnen
- Need to escape ]]>
- Prev by Date: Streaming XML
- Next by Date: Re: Streaming XML
- Previous by thread: Re: Need to escape ]]>
- Next by thread: How To View well formatted XML in IE 6.0
- Index(es):
Relevant Pages
|