I am using YQL and the results are being returned in XML, I have not opted for Json, this Time since I need to emit the exact html under the Results tag of YQL.
So i give a call to $.Ajax and get the xml and find the “results” node in the xml.
when i do an alert or appending to a div or a body of html, somehow it seems the whole of Div’s and Table’s and Td’s and Tr’s are getting ripped before rendering.
I did an alert still didn’t see the full raw html.
$("#result").html("<i>Loading...</i>");
$.ajax({
type: "GET",
url: yql,
dataType: "xml",
success: function (xml) {
info = $(xml).find('results');
alert(info.text());
$("body").html(info.text());
}
What am i missing over here.
CDATA for covering html inside xml is not an option over here, just trying to render what is being served from YQL.
Thanks
I just ran into this problem, and dug up a couple of solutions. The first and easiest would be to do this:
You can find that here (check in the response to the answer): How to use jquery get content with tags in xml
The second solution that worked for me was best explained here: Getting HTML from XML with JavaScript/jQuery