28,391
社区成员
发帖
与我相关
我的任务
分享
<%
s = "<xml rows=""7"">" &_
" <row id=""1"" str=""1111111111"" time=""2017-02-03 23:57:41""/>" &_
" <row id=""2"" str=""2222222222"" time=""2017-02-03 23:52:37""/>" &_
" <row id=""3"" str=""3333333333"" time=""2017-02-03 23:47:38""/>" &_
" <row id=""4"" str=""4444444444"" time=""2017-02-03 23:42:45""/>" &_
" <row id=""5"" str=""5555555555"" time=""2017-02-03 23:37:35""/>" &_
" <row id=""6"" str=""6666666666"" time=""2017-02-03 23:32:38""/>" &_
" <row id=""7"" str=""7777777777"" time=""2017-02-03 23:27:52""/>" &_
" </xml>"
Set oDoc = CreateObject("Msxml2.DOMDocument")
With oDoc
.async = False
.validateOnParse = False
.preserveWhiteSpace = False
.loadXML s
If .parseError.errorCode <> 0 Then
sErrMsg = .parseError.errorCode & "|" & .parseError.srcText & "|" & .parseError.reason
Response.Write sErrMsg
Response.End
End If
Set oNode = .selectSingleNode("/xml")
v = ""
If Not oNode Is Nothing Then v = oNode.getAttribute("rows")
Response.Write v
Set oNode = Nothing
End With
Set oDoc = Nothing
%>