asp 操作xml
<% dim xml,root,allitem,nodecount
set xml=server.CreateObject("MicroSoft.XMLDom")
xml.load(server.mappath("style.xml"))
if xml.parseError.errorCode <> 0 then
Response.Write "xml.parseError.errorCode = " &xml.parseError.errorCode
Response.Write "xml.parseError.reason = " &xml.parseError.reason
Response.Write "xml.parseError.line = " &xml.parseError.line
Response.End
end if
' '查找一个节点对象
' Set Root = xml.documentElement
' set allitem=Root.selectNodes( "//style ")
' nodeCount = allitem.length
'For i=0 to nodeCount-1
' response.write ( allitem(i).selectSingleNode( "S_ID ").text& " <br> ")
'next
'
'
'set objtofind=xml.documentElement.SelectSingleNode("//style/S_ID")
''取出这个节点对象的 节点名,节点值,某个属性值,和全部的xml
'nodename=objtofind.nodename
'nodevalue=objtofind.text
'response.Write(nodename)
'response.Write(nodevalue)
'response.Write("<br>")
'取出一个属性节点对象
set objattrtofind=xml.documentElement.SelectSingleNode("//style").GetAttributeNode("name")
'取出这个节点的属性名,属性值
nodeattrname=objattrtofind.nodename
nodeattrvalue=objattrtofind.text
response.Write(nodeattrname)
response.Write(nodeattrvalue)
dim objNodes
Set objNodes = xml.selectSingleNode("//style[@name=
相关文档:
'---------------------------------------------------------------------------------------------------1.asp
<!--#include file="function.asp" -->
<%if Request.Cookies("venshop")("user_name")<>"" then%>'当用户登录时可以执行then
<script>
function checkAll(){
&nbs ......
在 ASP 中使用 Request.ServerVariables("REMOTE_ADDR") 来取得客户端的 IP 地址,但如果客户端是使用代理服务
器来访问,那取到的就是代理服务器的 IP 地址,而不是真正的客户端 IP 地址。要想透过代理服务器取得客户端的真实
IP 地址,就要使用& ......
hzhost防asp攻击函数
Function SafeRequest(ParaName)
Dim ParaValue
ParaValue=Request(ParaName)
if IsNumeric(ParaValue) then
SafeRequest=ParaValue
exit Function
else
ParaValuetemp=lcase(ParaValue)
tempvalue="select
|insert |delete from|'|count(|dr ......
dim arr(36),xx,tt,tmp
for xx=1 to 36
arr(xx-1)=xx
next
for xx=1 to 5
Randomize
tt=clng((ubound(arr)-xx)*rnd())
response.write(arr(tt) & "<br>")
tmp=arr(tt)
arr(tt)=arr(ubound(arr)-xx)
arr(ubou ......
asp.net中打开新窗口的多种方法(转载)
1.Response.Redirect("XXX.aspx",true)——直接转向新的页面,原窗口被代替;
2. Response.Write("
")——打开新的页面,原窗口被代替;
4.Server.Transfer("XXX.aspx")——打开新的页面;
5.Response.Write("
......