I found this code but its not working... any suggestions the parsexml is never being called
$(document).ready(function(){
$.ajax({
type: "GET",
url: "menuitems.xml",
dataType: "xml",
success: parseXml
});
// fourth example
$("#black").treeview({
persist: "location",
collapsed: true
});
});
var strMenu = "";
function parseXml(xml)
{
alert();
$(xml).find("Item").each(function()
{
if ($("#output").append($(this).attr("type") == "topic")) {
strMenu += "<li><span>" + $("#output").append($(this).attr("name")) + "</span>";
} else if ($("#output").append($(this).attr("type") == "link")) {
strMenu += "<li><a href='" + $("#output").append($(this).attr("file")) + "'>" + $("#output").append($(this).attr("name")) + "</a></li>";
}
});
alert(strMenu);
}