This is my jquery code to read "test.xml".
var htmldata = 0;
$.get('test.xml', function(data) {
xml_data = $(data);
xml_data.find("order").find("customer").each(function(k, v) {
divClass = inactiveClass;
spanClass = inactiveIcon;
htmldata += '<div class="' + divClass + '"><span class="' + inactiveIcon + '"></span>' + $(this).text() + '</div>';
});
});
alert(htmldata);
In this code I tried to parse test.xml and creating one htmldata. But I am not getting that data out side. If I tried to alert its showing null. How can I take that value outside. Please help me.