太好了!
/*--------------------------------------------------------------------------
● 获取数据
--------------------------------------------------------------------------*/
xa=loadXML("../fictitious/Ajax/website.xml");
xn=xa.documentElement; //website根节点
var website_address=xn.getAttribute('address'); //网站根地址
var website_name=xn.getAttribute('name'); //网站名称
io=xn.childNodes[1].childNodes;
ion=io.length;
var website_products=Array();
for (i=0;i<ion;i++) website_products[io[i].getAttribute('comment')]=io[i].getAttribute('address');
var tieba_address=website_products['贴吧'];
websiteaddress=tieba_address;
现在各二级域名都能调用website.xml;