GXT Pagination Grid - Populate XML String as Grid Column Data
I am using GXT 2.2.4. I have a Grid where I am populting the list of records. One of the Grid column contains XML String data. When I populate this column in the GRID, I am only getting the plain text without any XML contents.
For example, the expected XML String in the column is,
<?xml version="1.0" encoding="UTF-8"?><emailConfiguration><Name>TESTApplication</Name><AppName>TESTAPP</AppName><From>XX</From><To>YY</To><Subject>Email Notification</Subject></emailConfiguration>
But the actual data populated in the column is,
Can you please suggest a way to populate and display the GRID column with XML content.
Thanks in advance
try using < and > in stead of < >
I also have same issue with my data. Is there any inbuilt function which can do this.
Assuming a relatively recent version of GWT, look at SafeHtmlUtils.fromString(String) or htmlEscape(String), depending on if you need a SafeHtml object for GXT 3 grid or a String for GXT 2. GXT 2.3.0 also added El.toSafeHTML(String) to properly escape a html string.
All of these are designed to properly escape content to be rendered in html without tags - this will work for xml as well as html.