I am trying to take the contents of 'description' and place it into a div. Below is the XML that comes from a jQuery ajax call.
<media>
<entry>
<title>Item Name</title>
<description>
<p>First Line<br />
Second Line</p>
<p>More Content</p>
</description>
<author>Name</author>
<date>2010-07-06</date>
</entry>
</media>
I have tried the following, but cannot get it to works. At best it shows up, but without any formatting (FF3). Otherwise a 'WRONG_DOCUMENT_ERR' error is shown (Chrome).
$.ajax({
url: xml_url,
dataType: "xml",
success: loadItem
});
function loadItem(data) {
$(data).find('entry').each(function() {
$(".playing div.description").html($(this).find("description"));
});
}
Is it even possible? Thanks.