Welcome Guest Search | Active Topics | Sign In | Register

XML CDATA Block Options
Loren Dorez
Posted: Thursday, June 18, 2009 4:16:06 PM
Rank: Advanced Member
Groups: Member

Joined: 1/9/2009
Posts: 97
Hi,

I have more of a support/general question. I wrote my own Ajax procedure for callback etc. But the Issue im having is you guys place your JS inside CDATA blocks is that correct? if so is there anyway to turn this off by a settings or something? If not Do you know of any work around for placing CData Block Within a CDataBlock?
eo_support
Posted: Thursday, June 18, 2009 4:24:33 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

If you wish to nest CDATA block, you should escape it. It's the same idea when you want to include quotes in your string constants --- The only way is to escape it.

There is no way to turn CDATA off as it is required by XHTML standard.

Thanks!
Loren Dorez
Posted: Thursday, June 18, 2009 4:44:24 PM
Rank: Advanced Member
Groups: Member

Joined: 1/9/2009
Posts: 97
Well IM new to this Ajax writing.

I foun d this method online that i use that take in the XMLTextWriter and array of ICollection.

The end response is it uses the XMLTW and call WriiteCDATA Method but if your control is sending CDATA to it as a string its basically writing

<!CDATA[ <!CDATA YOUR STUFF ]]> [/color] ]]>

is the Problem the Parse gets past the first CData block fine but from what i can see the ]]> causes issues and interpret it as the end. Now what do you men by escape start over once i hit your end of the CData Block or convert your end CData tag to &gt;?
eo_support
Posted: Thursday, June 18, 2009 4:57:05 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Escaping is to encode your text so that it is changed. In your case, I would think you need to replace ]] to something else so that it doesn't trigger the error. Obviously once it reaches the destination, you will need to change it back. You will need to devise a set of encoding/decoding rules that is both reversible (so that you can encode it and then decode it back) and lossless (so that no information is lost during the encoding/decoding process and you will always be able to decode it back to exactly what it was).


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.