Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Sergei Iliev on Apr 18, 2008 00:11
open dhtmlx forum
How to handle '&' in xml

Hello again.
I am mastering your Grid control and find it realy great but i am having problem when XML is raed from server and it has
the special forbidden characters in it like '&' ,'<','>'
I ve tryed
![CDATA[ ]]
but still the problem persists.

Thank you
Sergei
Answer posted by Support on Apr 18, 2008 01:54
There are two ways
a) use CDATA
    <cell><![CDATA[ > < & ]]></cell>
b) use escaping
    <cell> &gt; &lt; &amp; </cell>

This will allow the correct XML processing, but HTML also process such etities in special way, so you need

a) use text based cell types (rotxt, edtxt, cotxt, txttxt )
b) use double escaping
        <cell><![CDATA[ &gt; &lt; &amp; ]]></cell>