![]() |
#2
论坛元老2008-04-11 12:56
|
我的XML文件如下:

<?xml version='1.0' encoding='UTF-8'?>
<data>
<list>
<zl>产品类型1</zl><!-- 种类 -->
<bh>00001</bh><!-- 编号 -->
<zsl>34</zsl><!-- 总数量 -->
<m>15</m><!-- M规格 -->
<colo1>蓝</colo1><!-- 颜色 -->
<l>10</l><!-- L规格 -->
<colo2>蓝,黑</colo2><!-- 颜色 -->
<xl>7</xl><!-- XL规格 -->
<colo3>蓝</colo3><!-- 颜色 -->
<xxl>2</xxl><!-- XXL规格 -->
<colo4>蓝,黑</colo4><!-- 颜色 -->
<so>145</so><!-- 贴牌价 -->
</list>
<list>
<zl>产品类型二</zl><!-- 种类 -->
<bh>00002</bh><!-- 编号 -->
<zsl>10</zsl><!-- 总数量 -->
<m>5</m><!-- M规格 -->
<colo1>蓝</colo1><!-- 颜色 -->
<l>2</l><!-- L规格 -->
<colo2>蓝</colo2><!-- 颜色 -->
<xl>2</xl><!-- XL规格 -->
<colo3>蓝,</colo3><!-- 颜色 -->
<xxl>1</xxl><!-- XXL规格 -->
<colo4>蓝</colo4><!-- 颜色 -->
<so>235</so><!-- 贴牌价 -->
</list>
</data>
<data>
<list>
<zl>产品类型1</zl><!-- 种类 -->
<bh>00001</bh><!-- 编号 -->
<zsl>34</zsl><!-- 总数量 -->
<m>15</m><!-- M规格 -->
<colo1>蓝</colo1><!-- 颜色 -->
<l>10</l><!-- L规格 -->
<colo2>蓝,黑</colo2><!-- 颜色 -->
<xl>7</xl><!-- XL规格 -->
<colo3>蓝</colo3><!-- 颜色 -->
<xxl>2</xxl><!-- XXL规格 -->
<colo4>蓝,黑</colo4><!-- 颜色 -->
<so>145</so><!-- 贴牌价 -->
</list>
<list>
<zl>产品类型二</zl><!-- 种类 -->
<bh>00002</bh><!-- 编号 -->
<zsl>10</zsl><!-- 总数量 -->
<m>5</m><!-- M规格 -->
<colo1>蓝</colo1><!-- 颜色 -->
<l>2</l><!-- L规格 -->
<colo2>蓝</colo2><!-- 颜色 -->
<xl>2</xl><!-- XL规格 -->
<colo3>蓝,</colo3><!-- 颜色 -->
<xxl>1</xxl><!-- XXL规格 -->
<colo4>蓝</colo4><!-- 颜色 -->
<so>235</so><!-- 贴牌价 -->
</list>
</data>
产品有两百多个型号,也就是<list></list>要有200多个。
我的FLASH发送的语句如下:

chuanshu.neirong0_flash=_root.di.xiugaiyemian.editsr0.text;
chuanshu.neirong1_flash=_root.di.xiugaiyemian.editsr1.text;
chuanshu.neirong2_flash=_root.di.xiugaiyemian.editsr2.text;
chuanshu.neirong3_flash=_root.di.xiugaiyemian.editsr3.text;
chuanshu.neirong4_flash=_root.di.xiugaiyemian.editsr4.text;
chuanshu.neirong5_flash=_root.di.xiugaiyemian.editsr5.text;
chuanshu.neirong6_flash=_root.di.xiugaiyemian.editsr6.text;
chuanshu.neirong7_flash=_root.di.xiugaiyemian.editsr7.text;
chuanshu.neirong8_flash=_root.di.xiugaiyemian.editsr8.text;
chuanshu.neirong9_flash=_root.di.xiugaiyemian.editsr9.text;
chuanshu.neirong10_flash=_root.di.xiugaiyemian.editsr10.text;
chuanshu.neirong11_flash=_root.di.xiugaiyemian.editsr11.text;
chuanshu.sendAndLoad("text.asp", chuanshu, "post");
chuanshu.neirong1_flash=_root.di.xiugaiyemian.editsr1.text;
chuanshu.neirong2_flash=_root.di.xiugaiyemian.editsr2.text;
chuanshu.neirong3_flash=_root.di.xiugaiyemian.editsr3.text;
chuanshu.neirong4_flash=_root.di.xiugaiyemian.editsr4.text;
chuanshu.neirong5_flash=_root.di.xiugaiyemian.editsr5.text;
chuanshu.neirong6_flash=_root.di.xiugaiyemian.editsr6.text;
chuanshu.neirong7_flash=_root.di.xiugaiyemian.editsr7.text;
chuanshu.neirong8_flash=_root.di.xiugaiyemian.editsr8.text;
chuanshu.neirong9_flash=_root.di.xiugaiyemian.editsr9.text;
chuanshu.neirong10_flash=_root.di.xiugaiyemian.editsr10.text;
chuanshu.neirong11_flash=_root.di.xiugaiyemian.editsr11.text;
chuanshu.sendAndLoad("text.asp", chuanshu, "post");
ASP接收的语句如下:

<%
dim neirong0,neirong1,neirong2,neirong3,neirong4,neirong5,neirong6,neirong7,neirong8,neirong9,neirong10,neirong11;
//获取从FLASH传递过来的变量
neirong0=request.form("neirong0_flash");
neirong1=request.form("neirong1_flash");
neirong2=request.form("neirong2_flash");
neirong3=request.form("neirong3_flash");
neirong4=request.form("neirong4_flash");
neirong5=request.form("neirong5_flash");
neirong6=request.form("neirong6_flash");
neirong7=request.form("neirong7_flash");
neirong8=request.form("neirong8_flash");
neirong9=request.form("neirong9_flash");
neirong10=request.form("neirong10_flash");
neirong11=request.form("neirong11_flash");
Set xml=Server.CreateObject("Microsoft.XMLDOM")
xml.Async=False
xml.ValidateOnParse=False
xml.Load(server.mapPath("product.xml"))
Set item=xml.getElementsByTagName("link")
Response.write item.Length
//输出要返回到FLASH中的内容
//Response.Write("&fanhui_asp=你输入的内容是:"+" "+neirong0+" "+neirong1+" "+neirong2+" "+neirong11+" "+neirong3+" "+neirong4+" "+neirong5+" "+neirong6+" "+neirong7+" "+neirong8+" "+neirong9+" "+neirong10);
%>
dim neirong0,neirong1,neirong2,neirong3,neirong4,neirong5,neirong6,neirong7,neirong8,neirong9,neirong10,neirong11;
//获取从FLASH传递过来的变量
neirong0=request.form("neirong0_flash");
neirong1=request.form("neirong1_flash");
neirong2=request.form("neirong2_flash");
neirong3=request.form("neirong3_flash");
neirong4=request.form("neirong4_flash");
neirong5=request.form("neirong5_flash");
neirong6=request.form("neirong6_flash");
neirong7=request.form("neirong7_flash");
neirong8=request.form("neirong8_flash");
neirong9=request.form("neirong9_flash");
neirong10=request.form("neirong10_flash");
neirong11=request.form("neirong11_flash");
Set xml=Server.CreateObject("Microsoft.XMLDOM")
xml.Async=False
xml.ValidateOnParse=False
xml.Load(server.mapPath("product.xml"))
Set item=xml.getElementsByTagName("link")
Response.write item.Length
//输出要返回到FLASH中的内容
//Response.Write("&fanhui_asp=你输入的内容是:"+" "+neirong0+" "+neirong1+" "+neirong2+" "+neirong11+" "+neirong3+" "+neirong4+" "+neirong5+" "+neirong6+" "+neirong7+" "+neirong8+" "+neirong9+" "+neirong10);
%>
吃不消了,他限期搞定,眼看着期限就要到了,俺心是拔凉拔凉的。如果哪位高手能提供给我将编辑此XML文件的ASP源码(追加节点、修改节点内容、插入节点、删除节点),我感激不尽。大恩不言谢,如果您来到杭州,我一定请您吃饭!我的QQ784404211