473,385 Members | 1,615 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How can I have ']]>' as a text inside CDATA in xml

I have a text which may have character sequence ']]>' and I want to
put it inside a CDATA tag. Is it possible to encode this secquence in
the xml ?

Thanks in advance
-Neeraj
Jul 20 '05 #1
3 6626
> I have a text which may have character sequence ']]>' and I want to
put it inside a CDATA tag. Is it possible to encode this secquence in
the xml ?


Yes -- split it in two CDATA sections, e.g.:

<a><![CDATA[A CDATA text with a ]]]]><![CDATA[> in it]]>
</a>
=====
Cheers,

Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL
Jul 20 '05 #2
"Dimitre Novatchev" <dn********@yahoo.com> schrieb im Newsbeitrag
news:bn*************@ID-152440.news.uni-berlin.de...
I have a text which may have character sequence ']]>' and I want to
put it inside a CDATA tag. Is it possible to encode this secquence in
the xml ?


Yes -- split it in two CDATA sections, e.g.:

<a><![CDATA[A CDATA text with a ]]]]><![CDATA[> in it]]>
</a>


Or alternatively don't put it into a CDATA section in the first place (just
escape "&" as "& a m p ;" and "<" as "& l t ;").

Julian
Jul 20 '05 #3
In article <bn*************@ID-152440.news.uni-berlin.de>,
Dimitre Novatchev <dn********@yahoo.com> wrote:
Yes -- split it in two CDATA sections, e.g.:

<a><![CDATA[A CDATA text with a ]]]]><![CDATA[> in it]]>
</a>


You can regard ]]]]><![CDATA[> as an escape for ]]> if you like.

-- Richard
--
Spam filter: to mail me from a .com/.net site, put my surname in the headers.

FreeBSD rules!
Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Francesco Moi | last post by:
Hello. I'm trying to build a RSS feed for my website. It starts: ----------------//--------------------- <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE rss PUBLIC "-//Netscape...
4
by: fis | last post by:
Hi all, I've problem because there are needed break lines in my texts on the web site but i can't do it :( My pipeline looks like: XMS -> I18N -> XSLT -> HTML I have lot of texts in my...
2
by: Donald Firesmith | last post by:
I am having trouble having Google Adsense code stored in XSL converted properly into HTML. The <> unfortunately become &lt; and &gt; and then no longer work. XSL code is: <script...
9
by: Julia Briggs | last post by:
How do I construct a <iframe> or equivalent for FireFox/NS browsers, inside a screen centered <div> tag? Can it be done?
7
by: Tony | last post by:
I'm using XmlTextWriter to write XML to a string and XmlDocument to read it back. Every thing works OK except if my data contains a < or >. If this is the case they get saved as < > repectively....
7
by: kashaziz | last post by:
Hello, I am here after head-banging with this issue for several days. I am trying to parse a feed using JS and have stucked on the <content:encoded> tag. I have tried getElementsbyTagName but...
4
by: manu3d | last post by:
Hi everybody, I'm using the event "onload" to trigger a function when an image has been preloaded. But it seems to me that the function is triggered right at the beginning of the transfer from...
1
by: seeCoolGuy | last post by:
I've been using Access to import some data straight into a sql server database by simply importing the xml file. However lately some of the newer xml files will contain vaild data such as ...
3
by: Eric | last post by:
I'm trying to build a mailto url like so: <td class="{$sData}"><!]><xsl:value-of select="email"/><!]><xsl:value-of select="email"/><!]></td> The html that's rendered looks like I would expect...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.