日期:2014-05-16 浏览次数:20760 次
xxx="<xml>"
xxx=xxx&"<ToUserName><![CDATA[gh_xxxxxx]]></ToUserName>"
xxx=xxx&"<FromUserName><![CDATA[oFCiAjoShGKSvxxxCe2CyFNT-7Pw]]></FromUserName>"
xxx=xxx&"<CreateTime>1360390533</CreateTime>"
xxx=xxx&"<MsgType><![CDATA[text]]></MsgType>"
xxx=xxx&"<Content><![CDATA[内容]]></Content>"
xxx=xxx&"<MsgId>5842832849123009172</MsgId>"
xxx=xxx&"</xml>"
Set xmlDOC = server.CreateObject("MSXML.DOMDocument")
If xmlDOC.ReadyState>2 Then
Response.Write("1:"& xmlDOC.ReadyState&"<br>" )
xmlDOC.load(xxx)
'xmlDOC.load(Server.MapPath("1.xml"))
response.write xmlDOC.getElementsByTagName("sUser").item(0).text
Else
Response.Write("2:"& xmlDOC.ReadyState )
end if
Set xmlDOC = nothing
xxx="<xml>"
xxx=xxx&"<ToUserName><![CDATA[gh_xxxxxx]]></ToUserName>"
xxx=xxx&"<FromUserName><![CDATA[oFCiAjoShGKSvxxxCe2CyFNT-7Pw]]></FromUserName>"
xxx=xxx&"<CreateTime>1360390533</CreateTime>"
xxx=xxx&"<MsgType><![CDATA[text]]></MsgType>"
xxx=xxx&"<Content><![CDATA[内容]]></Content>"
xxx=xxx&"<MsgId>5842832849123009172</MsgId>"
xxx=xxx&"</xml>"
Set xmlDOC = Server.CreateObject("MSXML.DOMDocument")
' If xmlDOC.ReadyState>2 Then
' Response.Write("1:"& xmlDOC.ReadyState&"<br>" )
' xmlDOC.load(xxx)
xmlDOC.loadXML(xxx)''''''''''''''''''
'xmlDOC.load(Server.MapPath("1.xml"))
Response.Write xmlDOC.getElementsByTagName("ToUserName").item(0).text
' Else
' Response.Write("2:"& xmlDOC.ReadyState )
' end if
Set xmlDOC = nothing