PDA

View Full Version : How to hide CDATA tag from appearing in IE displayed XML?


manasnair
07-14-2009, 08:48 AM
Hi,

I have been using this xml

<title>rb_06_aug_04</title>
- <description>
- <![CDATA[ <p><b>story links:</b> <a href=”http://www.racewalk.com” targe .....

In IE it's showing the CDATA tag....

In firefox, the same XML looks like
<title>rb_06_aug_04</title>

<description>
<p><b>story links:</b> <a href=”http://www.racewalk.com” targe….

The CDATA tag is missing.....

I need a way to hide the CDATA tag in IE just as it is hidden in FireFox.

Kindly help as it is urgent.
NB: I am new to XML

ckeyrouz
07-14-2009, 04:47 PM
Why you want to hide it??
Are you displaying the XML as is in your browser?

I do not think you can hide it, it is how IE works.

You can transform it into HTML using xsl and you can display the data anyway you want.

Clarify your need more to help.

manasnair
07-15-2009, 07:02 AM
Hi ckeyrouz,

Thanks for the answer

The requirement is pretty simple.
The XML when displayed on FF and IE should behave the same (though it sounds a little awkward, considering differences in the parsing mechanisms associated with the browsers).

In FF, the CDATA tag name isn't displayed. In IE it is.
I need IE to behave like FF i.e. if I have an element CDATA, the CDATA markup alone should visible and the content displayed.

I hope to stumble upon some way to do it.

ckeyrouz
07-15-2009, 07:04 AM
hehe

I understand your need but I think you should report this issue to MicroSoft.

Mulgravia
07-15-2009, 04:59 PM
Hi,

I have been using this xml

<title>rb_06_aug_04</title>
- <description>
- <![CDATA[ <p><b>story links:</b> <a href=”http://www.racewalk.com” targe .....

In IE it's showing the CDATA tag....

In firefox, the same XML looks like
<title>rb_06_aug_04</title>

<description>
<p><b>story links:</b> <a href=”http://www.racewalk.com” targe….

The CDATA tag is missing.....

I need a way to hide the CDATA tag in IE just as it is hidden in FireFox.

Kindly help as it is urgent.
NB: I am new to XML

HI,
It looks to me that you need to close the end of the CDATA with this //]]

In other words start with //<![CDATA[ your data goes here and close with //]]>

Hope this helps
Mulgravia .