$(document).ready(function(){
$.get("test.xml",{},function(xml){
x=xml.documentElement;
y=x.children;
for (i=0;i<y.length;i++)
{
document.write(" Nodename: " + y[i].nodeName + "<br>");
for (z=0;z<y[i].children.length;z++)
{
var $node1 = $(y[i].children[z]);
var key = $node1.attr("key");
var value = $node1.attr("value");
document.write("----- Child Nodename: " + y[i].children[z].nodeName +" Key " + key +" value " + value + "<br>" );
}
}
});
});