Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by andres toussaint on Feb 18, 2009 10:35
open dhtmlx forum
serialize tree, node has quote as part of the value

When serializing a tree. If some node has a quote as part of the text value, this does not get properly encoded, making the XML unparsable by the consumer of this xml.

This is an example of the Serialized output:
<?xml version="1.0"?>
<tree id="0">
<item id="1234" select="1" text="New Node with a quote "">
<userdata name="somedata">
</userdata>
</item>
</tree>

Notice the Quote at the end of the text attribute. This quote is there on purpose. It should be encoded or escaped on the XML, so a XML parser can identify the end of the attribute value.

Is there a setting that I am missing that will encode/escape the text values?
Answer posted by Support on Feb 19, 2009 02:47
You can use
     tree.registerXMLEntity('"',' any replacement here ')
     tree.setSerializationLevel(false,false,true);