How to extract part of the resultXML of $.ajax() call?
- $.ajax({
- type: "POST",
- url: "some_url",
- dataType: "xml",
- success: function(result){
- // code...
- }
- });
The code above 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>
I would like to assign the third XML to a DHTMLX grid but I'm not able to extract it from the output of the ajax call. The following command
- console.log($(result).find("THIRD").text());
only outputs the THIRD XML without tags. It has output only the content of tags but the tags are missing, so I cannot assign this content to a grid.
How to extract the THIRD xml from the result of $.ajax() call?