首页 > 代码库 > jquery操作xml

jquery操作xml

$.ajax({

  url: "a.xml",

  dataType: "xml",

  type: "GET",

  error: function(xml) {alert("error");},

  success: function(xml) {

    $(xml).find("tag").each(function(i) {

      var id = $(this).attr("id");

      var lower = $(this).children("lower").text();

      //......

    });

  }

});

jquery操作xml