Click to See Complete Forum and Search --> : How to Use CDATA ....


Kamal Kumar
September 12th, 2000, 01:25 PM
Hello ...

i have problem in using CDATA ...

TEST
RS
R Mystatement = ![CDATA=["This & that [stuff] is just text content."]]
/RS
/TEST .

if i remove CDATA there is a problem with & and any special characters ...other wise nothing is displayed on my IE .
is there any setting to be done in XSL or any special dom for that one ..... can any one help me in this regards

Thanks

sharma-kapil
September 14th, 2000, 01:18 PM
What do you exactly want to display in the browser? As far as special characters are concerned you need to replace them by entity references e.g.

replace & by & amp;

~ Hope this helps
~ kapil


~ ks

sharma-kapil
September 14th, 2000, 01:31 PM
What do you exactly want to display in the browser? If you want to display the text conatined in cdata then use:

?xml version="1.0"?
?xml-stylesheet type="text/css" href="stylesheet"
TEST
RS
![CDATA["This & that [stuff] is just text content."]]
/RS
/TEST

Remember that you need stylesheet to format the text.

~ Hope this helps
~ kapil


~ ks