先码好
$.ajax({
url : '/xml/test.xml',
type : 'GET',
dataType : 'xml',
cache : false,
success : function(xml) {
$(xml).find("items").each(function() {
var $book= $(this);
var oid = $book.attr("id");
var author = $book.children("author").text();
var dimension = $book.children("dimension").text();
var other = $book.children("other").text();
//其他操作
});
}
});
$.ajax({
url : '/xml/mingrenmingyan.xml',
type : 'GET',
dataType : 'xml',
cache : false,
success : function(xml) {
var param = $(xml).find("param");
for(i=0;i<param .length;i++){
var paramName = $(param[i]).attr("name");
var rDescription = $(param[i]).attr("rDescription");
var format = $(param [i]).attr("format");
}
}
})