How to load content to a grid from a parsed fragment?

I’m using $.ajax() which returns me the following XML:

<ALL>
  <FIRST>
    <content>of the first xml...</content>
  </FIRST>
  <SECOND>
    <some>other xml...</some>
  </SECOND>
  <THIRD>
    <content>of a DHTMLX grid</content>
  </THIRD>
</ALL>

the THIRD XML is the content to assign to a grid. But how to load this content to a grid?

You need to split your xml manually, so the grid will get only that content that is required.

Okay, but how to create that XML as a string? The following command displays that XML in Firefox but not in other browsers:


console.log($(result).context.lastChild.lastElementChild.innerHTML);

Or do I have to use some library to obtain the XML in text format?