Thursday, March 11, 2010

Reading XML with JQuery


ShareThis

Recently I learnt how to read XML with JQuery.

It’s really fun to read XML document and parse its nodes using JQuery.

Loading the XML doc is so easy:

$.ajax({
type: "GET",
url: "sites.xml",
dataType: "xml",
success: function(xml) {

}
});



 



Finding a node is easy too:



$(xml).find('site').each(function(){

});



 



Here you can read an excellent article to learn Reading XML with jQuery


0 comments: