> I am looking for some basic examples showing how to do simple XHR's
> with both XML and JSON datatypes. How do you parse the XML vars using
> Jquery? I am looking for simple examples that I can learn from.
Just use the $.ajax function, and set the dataType option like this:
$.ajax({
url: 'ajax.php',
dataType: 'xml',
success: function(xml) {
// do something with XML document with DOM functions
var items = xml.getElementsByTagName('item');
}
}
You can see the documentation of the $.ajax function here:
http://docs.jquery.com/Ajax/jQuery.ajax#optionsJesse
www.thefutureoftheweb.com