<? XML version = "1.0" encoding = "UTF-8"?>
<Root>
<Passji id = "1">
<Message> Mao Zedong said: the world is yours and ours, but it is yours in the end, so it is time-consuming and 10 thousand years long! You know! </Message>
</Passji>
<Passji id = "2">
<Message> passji said: if there are too many tasks to be completed, it is best to develop a thorough and detailed plan for step-by-step execution! </Message>
</Passji>
</Root>
$ (Document). Ready (function (){
$. Ajax ({
URL: "passji. xml", // link
Cache: True, // use Cache
Async: True, // asynchronous. the browser may be locked during synchronization.
// Processdata: false, // send XML data to the server and set the processdata option to false to Prevent Automatic Data Format Conversion
Datatype: "XML", // read type
Type: "Get", // Transmission Mode
Success: function (XML ){
$ (XML). Find ("root> passji [ID = 2]"). Each (function (){
Alert ($ (this). Find ("message"). Text ();
});
}
});
});