Escaped characters split causing Load XML error

I am inserting an escaped single quote (‘) into a tree and the escaped character is getting truncated to get displayed in the tree. This causes the following XML to get loaded (note the &) cutting the encoded character and replacing it with ‘…". How can I fix this?









    

    <item id=‘303_s_2’ text=’#########0#########0#########0#&…’ child=‘0’ im0=‘er.gif’

The & is reserved character in both XML and HTML, so it requires a gouble quoting, such as�<item text=“some&quot;text” �// => some"textor itemtext tag with CDATA can be used� � �