=波波日志 > Asp/VBScript > ASP 解析XML =
[转]ASP 解析XML
Public function getHTTPPage(url)
dim Http
set Http=server.createobject("MSXML2.XMLHTTP")
Http.open "GET",url,false
Http.send()
if Http.readystate<>4 then
exit function
end if
getHTTPPage=Http.responseText
set http=nothing
if err.number<>0 then err.Clear
end function
strXML=getHTTPPage("http://www.vcpit.com/getdata/pl.php?action=pack&game=100&site=www.wowgold800.com")
Set objXML = Server.CreateObject("MSXML2.DOMDocument")
objXML.validateonparse = true
objXML.async=false
objXML.loadXML(strXML)
Set objNodes = objXML.getElementsByTagName("Packs/Pack")
if not isNUll(objNodes(0)) then
For i= 0 to cint(objNodes.length)-1
%>
<li>
<form action='powerlevel_orderinfo.asp' id='pack<%=i%>' method='post'>
<input type='hidden' name='itemname' value='<%=Trim(objNodes(i).getAttribute("Name"))%>'/>
<input type='hidden' name='needprice' value='<%=Trim(objNodes(i).selectSingleNode("Price").Text)%>'/>
<input type='hidden' name='needtime' value='<%=Trim(objNodes(i).selectSingleNode("Time").Text)%>'/>
<input type='hidden' name='Desc' value='<%=Trim(objNodes(i).selectSingleNode("Desc").Text)%>'/>
<input type='hidden' name='guid' value='<%=Trim(objNodes(i).selectSingleNode("guid").Text)%>'/>
<input type='hidden' name='status' value='<%=Trim(objNodes(i).selectSingleNode("status").Text)%>'/>
<span class="list2a"><a href="javascript:$('pack<%=i%>').submit();"><%=Trim(objNodes(i).getAttribute("Name"))%></a></span> <span class="list2b">$ <%=Trim(objNodes(i).selectSingleNode("Price").Text)%></span> <span class="list2c"><%=Trim(objNodes(i).selectSingleNode("Time").Text)%> day</span> <span class="list2d"><a href="javascript:$('pack<%=i%>').submit();" class="buy">Buy Now</a></span>
</form>
</li>
<%
next
end if
%>
http://demopro.myzhongsou.cn/hz/gj/hsj/index.asp
dim Http
set Http=server.createobject("MSXML2.XMLHTTP")
Http.open "GET",url,false
Http.send()
if Http.readystate<>4 then
exit function
end if
getHTTPPage=Http.responseText
set http=nothing
if err.number<>0 then err.Clear
end function
strXML=getHTTPPage("http://www.vcpit.com/getdata/pl.php?action=pack&game=100&site=www.wowgold800.com")
Set objXML = Server.CreateObject("MSXML2.DOMDocument")
objXML.validateonparse = true
objXML.async=false
objXML.loadXML(strXML)
Set objNodes = objXML.getElementsByTagName("Packs/Pack")
if not isNUll(objNodes(0)) then
For i= 0 to cint(objNodes.length)-1
%>
<li>
<form action='powerlevel_orderinfo.asp' id='pack<%=i%>' method='post'>
<input type='hidden' name='itemname' value='<%=Trim(objNodes(i).getAttribute("Name"))%>'/>
<input type='hidden' name='needprice' value='<%=Trim(objNodes(i).selectSingleNode("Price").Text)%>'/>
<input type='hidden' name='needtime' value='<%=Trim(objNodes(i).selectSingleNode("Time").Text)%>'/>
<input type='hidden' name='Desc' value='<%=Trim(objNodes(i).selectSingleNode("Desc").Text)%>'/>
<input type='hidden' name='guid' value='<%=Trim(objNodes(i).selectSingleNode("guid").Text)%>'/>
<input type='hidden' name='status' value='<%=Trim(objNodes(i).selectSingleNode("status").Text)%>'/>
<span class="list2a"><a href="javascript:$('pack<%=i%>').submit();"><%=Trim(objNodes(i).getAttribute("Name"))%></a></span> <span class="list2b">$ <%=Trim(objNodes(i).selectSingleNode("Price").Text)%></span> <span class="list2c"><%=Trim(objNodes(i).selectSingleNode("Time").Text)%> day</span> <span class="list2d"><a href="javascript:$('pack<%=i%>').submit();" class="buy">Buy Now</a></span>
</form>
</li>
<%
next
end if
%>
http://demopro.myzhongsou.cn/hz/gj/hsj/index.asp
类别:Asp/VBScript 作者:转载 日期:2009-07-22 【评论:0】
暂时没有评论!
发表留言
百度赞助
同类热门博文
- ·IE里Cookie跨域不能..
- ·Cookie在IE浏览器跨..
- ·VBScript如何调用异..
- ·解决无法修改window..
- ·客户端VBScript和Ja..
- ·Asp.Net--C#字符串类..
- ·VB使用WebBrowser读..
- ·用批处理命令+VBScr..
博格Tag
- flash/flex/fcs/AIR(752)
- Asp.Net/C#/WCF(598)
- 操作系统及应用软件(376)
- JavaScript/Ajax(330)
- SQL及数据库(134)
- 黑客技术(115)
- Asp/VBScript(111)
- HTML/WML/CSS兼容/XML(102)
- PHP/apache/Perl(96)
- 网站排名及优化(94)
- 其他(75)
- showbo日志(66)
- lucene.net/分词技术(33)
- 计算机网络(26)
- 机械重工(26)
- C#设计模式(25)
- Google Maps开发(17)
- 日语学习(15)
- Canvas/VML/SVG(13)
- linux(11)
- 游戏开发(8)
- 正则表达式(5)
- Jsp/Java(4)
最新博文
- ·利用U盘进行软件加密..
- ·VB获取计算机硬件序..
- ·asp cookies方法
- ·Asp Cookie属性
- ·asp Response.Buffe..
- ·URL欺骗/钓鱼网站的..
- ·关闭危险端口防止病..
- ·asp遍历applicaton/..
随机博文
