日期:2008-12-03  浏览次数:20994 次

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+           超级+无敌--------XML+javascript+ASP在线短信息功能---介绍

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



---------下面的文件就是发送删除已看过信息的eChangXML.ASP页,代码比较长,慢慢看看-----------

<%@EnableSessionState=False%>
<%
Option Explicit
Response.CacheControl = "no-cache"
Response.AddHeader "Pragma", "no-cache"
Response.Expires = 0
Dim MyID
MyID = Request.Cookies("MyID")
If Not Isnumeric(MyID) Then
Response.Write("<A><B>true</B></A>")
ElseIf ReMove() Then
Response.Write("<A><B>true</B></A>")
Else
Response.Write("<A><B>false</B></A>")
End If


Function ReMove
Dim XMLDom
Dim Client
Dim Path
Dim XMLDomNode
Dim ClientNode
Dim XML
Dim ClientXML
On Error Resume Next
Path = Server.MapPath("XML/" & MyID & ".XML")
Set XMLDom=Server.CreateObject("Microsoft.XMLDOM")
Set Client=Server.CreateObject("Microsoft.XMLDOM")

XMLDom.Async=False
XMLDom.Load Request
Client.Async=False
Client.Load Path

If XMLDom.parseError.errorCode<>0 Then
ReMove = True
ElseIF Client.parseError.errorCode<>0 Then
ReMove = True
Else
Set XMLDomNode = XMLDom.documentElement
Set ClientNode = Client.documentElement

For Each XML In XMLDomNode.childNodes
    
    For Each ClientXML In ClientNode.childNodes
               If XML.Attributes.getNamedItem("ONLY").nodeValue = ClientXML.Attributes.getNamedItem("ONLY").nodeValue Then
               ClientNode.reMoveChild(ClientXML)
               End IF
    Next

Next
Application.Lock
Client.Save Path
Application.unLock
End If
Set Client=Nothing
Set XMLDom=Nothing
If Err.number<>0 Then
Err.Clear
ReMove = True
End If
End Function
%>



------------------------------------等等是发送信息的ASP文件------------------------------------