建站代码网

热门标签

ASP读取XML文件节点值

Function GetNode (Nname) 

Dim StrBK,start,over,RsBK
StrBK=ReadFromTextFile ("txt/xuan.txt","utf-8")
StrBK=Replace(StrBK,">","")
StrBK=Replace(StrBK,"<","")

start=Instr(StrBK,Nname)
over=Instr(StrBK,"/"&Nname) '
RsBK=mid(StrBK,start,over-start)
RsBk=replace(RsBK,Nname,"")
 GetNode=RsBk
End Function

<table border=1 width="500" cellspacing=1 cellpadding=3 align=center bordercolorlight="#326598" bordercolordark="#ffffff">
<tr bgcolor="#e8f4ff">
      <td height=25 colspan="2" background ="admin/images/pics/tile_sub.gif">
   <div align="center"><b><font color="#FFFFFF">套餐相关信息</font></b></div></td>
  </tr>
<tr>
<td width="31%" height="25">&nbsp;上网卡号</td>
<td width="69%" height="25">&nbsp;<%= GetNode("AccountNum") %></td>
</tr>
 <tr>
<td width="31%" height="25">&nbsp;剩余时长(分钟)</td>
<td width="69%" height="25">&nbsp;<%= GetNode("ResSurplus") %></td>
</tr>
<tr>
<td width="31%" height="25">&nbsp;套餐总时长(分钟)</td>
<td width="69%" height="25">&nbsp;<%= GetNode("TotalResFree") %></td>
</tr>
 
</table>

X