a.xml
<?xml version="1.0" encoding="gb2312" ?>
<root>
<item>200803/20070720045317865.jpg</item>
<item>200803/20070720045330192.jpg</item>
<item>200803/20070727042220683.jpg</item>
<item>200803/20070727042234713.jpg</item>
<item />
</root>b.htm
<script>var ar=new Array();
</script>我想解析这段xml到数组ar中
结果该是:
ar[0]=200803/20070720045317865.jpg
ar[1]=200803/20070720045330192.jpg
ar[2]=200803/20070727042220683.jpg
ar[3]=200803/20070727042234713.jpg请问怎么写啊.
http://www.web1357.cn/post/js_xml_no_refresh.html