28,409
社区成员




<?xml version="1.0" encoding="gb2312"?>
<images>
<img>
<url>images/01.jpg</url>
<link>http://www.lanrentuku.com/</link>
</img>
<img>
<url>images/02.jpg</url>
<link>http://www.lanrentuku.com/</link>
</img>
<img>
<url>images/03.jpg</url>
<link>http://www.lanrentuku.com/</link>
</img>
<img>
<url>images/04.jpg</url>
<link>http://www.lanrentuku.com/</link>
</img>
<img>
<url>images/05.jpg</url>
<link>http://www.lanrentuku.com/</link>
</img>
</images>
<% 'UPDATE部分
linkk=request.form("link")
imgurll=request.form("imgurl")
action=Request.Querystring("action")
if action="update" then
strSourceFile = Server.MapPath("./") & "\top2.xml"
Set objXML = Server.CreateObject("Microsoft.XMLDOM")
objXML.async = false'
objXML.load(strSourceFile)
dim objXdn
set objXdn=objXml.selectSingleNode("//url[value()='"&rqurl&"']")
if objXdn is nothing then
response.write "该节点不存在"
else
objXdn.setAttribute "url",imgurll
objXdn.setAttribute "link",linkk
objXML.save(strSourceFile)
Response.Redirect("index.htm")
end if
end if
%>
dim objXdn
set objXdn=objXml.selectSingleNode("//url[value()='images/05.jpg']")
if objXdn is nothing then
response.write "no such url node."
else
objXdn.setAttribute "url","xxx.jpg"
response.write "change ok"
end if