28,391
社区成员
发帖
与我相关
我的任务
分享
<%
s = "<a>" &_
" <b i=""0"">0</b>" &_
" <b i=""1"">1</b>" &_
" <b i=""2"">2</b>" &_
" <b i=""3"">3</b>" &_
" <b i=""4"">4</b>" &_
" <b i=""5"">5</b>" &_
" <b i=""6"">6</b>" &_
" <b i=""7"">7</b>" &_
" <b i=""9"">9</b>" &_
" <b i=""10"">10</b>" &_
" <b i=""11"">11</b>" &_
" <b i=""12"">12</b>" &_
" </a>"
Set oDoc = CreateObject("Msxml2.DOMDocument")
With oDoc
.async = False
.validateOnParse = False
.loadXML s
If .parseError.errorCode <> 0 Then
s = .parseError.reason
Set oDoc = Nothing
Responnse.Write s
Response.End
Else
Set oNode = .selectSingleNode("//b[@i=""9""]")
If Not oNode Is Nothing Then
Set oNewNode = .createElement("b")
oNewNode.text = 8
oNewNode.setAttribute "i", 8
oNode.parentNode.insertBefore oNewNode, oNode
oDoc.save "D:\test.xml"
End If
End If
End With
Set oDoc = Nothing
%>