async: true, / / default: true (asynchronous request)
cache: true, / / default: true, set to false will not be from the browser cache load request information
type: "POST", / / default: GET, the request of the way
dataType: "xml", / / server's return data type [ "xml", "html", "script", "json", "jsonp"]
url: "url", / / (default: current page address) to send the address of the request
data: (key: "value"), / / sent to the server data
error: function (xml) (alert ( 'Error Loading XML document' + xml);) / / request failed when the call
timeout: 1000, / / Set the request timeout
success: function (xml) (/ / request successful callback function parameters: the server return data format
$ ( "# user"). empty ();
/ / Deal with xml data using jQuery
$ (xml). find ( "Table"). each (function () (
var loginname = $ (this). find ( "Loginname"). text ();
var name = $ (this). find ( "Name"). text ();
$ ( "# user"). append ( "<li>" + loginname + "-" + name + "</ li>");
));
-------------------------------------------------- --------------------
$ (xml). find ( "user"). each (function (i) (
var loginname = $ (this). find ( "user loginname"). eq (i). text ();
var name = $ (this). find ( "user name"). eq (i). text ();
$ ( "# user"). append ( "<p>" + loginname + "</ p> +" <p> "+ name +" </ p> <br/> ");
));
-------------------------------------------------- --------------------
$ (xml). find ( "student"). each (function (i) (
var id = $ (this). children ( "id"); / / check object
var id_value = $ (this). children ( "id"). eq (i). text (); / / check version
alert (id_value); / / This is the id value
alert ($ (this). attr ( "email")); / / here to show the student's email property
$ ( "<li> </ li>"). html (id_value). appendTo ( "<ol>");
));
)
));







