473,383 Members | 1,748 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,383 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 6625
> 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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...

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.