List页面代码apiUrl=doserver&"orderinfo.asp?static=1&mobile="&tel&"&oname="&ecs(UserName)&""
set xml=GetXmlA(apiUrl,"")
<%
if xml.xml<>"" then  
Set Rst=xml.documentElement.selectNodes("//myorder/orderinfo")
If Not Rst Is Nothing Then
For i=0 To (Rst.Length-1)
with Rst(i)
  fid=.getAttribute("orderid")
  UserName=.getAttribute("UserName")
  zhuangtai=.getAttribute("Status")
end with
%>
<li><%=i+1%>.<%=UserName%></li>
<li><span class="zt"><%=zhuangtai%></span> <a href="order_info.asp?id=<%=fid%>">查看详情</a></li>
<% Next
Else
Response.Redirect("msg.asp?m="&ec("没有找到您搜索的订单,请检查您输入的姓名和手机号码是否正确!"))
End If
  End if
Set Xml=Nothing%>
问题原因:fid username zhuangtai 一直取不到值,for循环正常执行,我怀疑是Set Rst=xml.documentElement.selectNodes("//myorder/orderinfo")这个地方出错,由于刚学习xml 不是很理解,发现不了错误在哪里,还请高手帮忙
orderinfo.asp
页面,生成的xml页面<?xml version="1.0" encoding="utf-8"?>
<myorder v="订单查询处理">
<orderinfo><orderid>1</orderid>
<UserName>张三</UserName>
<mobile>123456</mobile>
<address>北京市工人路413号</address>
<productid>8000528</productid>
<Status></Status>
</orderinfo>
<orderinfo><orderid>2</orderid>
<UserName>李四</UserName>
<mobile>12345645</mobile>
<address>江苏南昌工人路413号</address>
<productid>8000530</productid>
<Status></Status>
</orderinfo>
<orderinfo><orderid>3</orderid>
<UserName>李五</UserName>
<mobile>56456454</mobile>
<address>河北是工人路413号</address>
<productid>8000525</productid>
<Status></Status>
</orderinfo>
</myorder>