How to reproduce any character in a TreeGrid cell?

I have a text column in a TreeGrid object that sometimes will have very strange characters in it (I think some of it is Chinese; some of it is simply stuff like ampersands and such). These characters do need to be reproduced. We are using the XML streaming method to get the data into the grid via mygrid.loadXML().

I have tried each of the following variants, none of which generate working XML:


Where weirdData =
'録画してもタイトルリストに反映されない/ Slow Performance 多発 /LBA:46080~異音有り(カチッ・・・カチッ・・・カチッ・・・) READ前→Error log:0,Cri…

Any ideas? In HTML, simply stating

weirdData is sufficient. I just don’t know how to generate the XML to get the TreeGrid to do the same thing. I get the “badly formed XML” error.


Please open ticket at and provide us example where we can reproduce this issue.

Hi Olga -

I tried to create a small mockup that reproduces the problem, and could not. It turns out that the issue is data related. The offending data contains unprintable characters (07, 1B, 81, etc) because the data record was mangled. The XML file is generated at runtime based upon a SQL query, and is used to populate the grid cells. The reason my mockup didn’t work is that in a text editor, those characters (and others) are not allowed so I could not dummy one up.

I really cannot send you live data due to corporate security rules, and to edit one of my application-generated XML files to snip out only the infected part will by the nature of my editors strip out the very characters I’m trying to isolate to send to you.

Bottom line is, I will need to write a filter for garbage characters before sending them to the XML generator. I will likely convert them to some printable char (Browsers use “?”) myself so garbage records won’t crash my application.

Thanks for your help, and hopefully this thread will help someone else.

BTW - I found the answer by running in FF with FireBug loaded, and when the “Bad XML” error came up, examined it in the debugger. The offending line can be looked at with a small graphic showing the Unicode of the unprintable character(s) in the string.