var source=new ActiveXObject("Msxml2.DOMDocument");
source.async=false;
source.load("xml.xml")
nodes = source.documentElement.childNodes;
var ItemN = source.getElementsByTagName("pic");
var j = ItemN.length;//获取item节点个数
var array1=new Array();
var array2=new Array();
var array3=new Array();
for(i=0;i<j;i++)
{
array1[i]=ItemN[i].selectSingleNode("img").text;//获取img内容
array2[i] = ItemN[i].selectSingleNode("title").text;//获取title内容
array3[i] = ItemN[i].selectSingleNode("url").text;//获取url内容
}
source.async=false;
source.load("xml.xml")
nodes = source.documentElement.childNodes;
var ItemN = source.getElementsByTagName("pic");
var j = ItemN.length;//获取item节点个数
var array1=new Array();
var array2=new Array();
var array3=new Array();
for(i=0;i<j;i++)
{
array1[i]=ItemN[i].selectSingleNode("img").text;//获取img内容
array2[i] = ItemN[i].selectSingleNode("title").text;//获取title内容
array3[i] = ItemN[i].selectSingleNode("url").text;//获取url内容
}