parsing xml to return a img from a url



im looking to get a img from a xml url. i can parse the other data such as text but not sure why it is only returning the text url and not the image itself. Thanks for any help



<div class="myDiv" id="div1">
<div class="row pull-right" id="div1">
<div class="row">
<script>
$(document).ready(function () {
$.ajax({
type: "GET",
url: "/xml_Anteater/xml/gt.xml",
dataType: "xml",
success: xmlParser
});
});

function xmlParser(xml) {
$('#load').fadeOut();
$(xml).find("ROWSET ROW").each(function () {
$("#div1").append('<div class="col-md-3">' + $(this).find("product_name").text() + '<br />' + $ (this).find("merchant_image_url").text() + '<br /> £' + $(this).find("search_price").text() + '<br />' + '</div></div>');

});

}
</script>
<div id="div1"></div>
</div>
</div>
</div>

No comments:

Post a Comment