2014-07-01 100 views
0

看看下面的代碼:如何使用vbscript替換節點值?

' Set up the response for the request 
Set nodeTier = CreateNode(rootResponse, "RequestResponse", "") 
Set nodeTierSuccess = CreateNode(nodeTier, "SuccessCode", "1") 
Set nodeTierSuccess = CreateNode(nodeTier, "Order", "") 

我將如何改變 'SuccessCode' 從 '1' 到 '0' 值?

+0

「更改值」在什麼情況下? –

回答

0

使用Docs查找在這個演示代碼中使用的方法:

>> Set oX = CreateObject("msxml2.domdocument") 
>> Set oX.documentElement = oX.createElement("a") 
>> Set oS = oX.createElement("s") 
>> oS.appendChild oX.createTextNode("0") 
>> oX.documentElement.appendChild oS 
>> WScript.Echo oX.xml 
>> oS.text = "1" 
>> WScript.Echo oX.xml 
>> 
<a><s>0</s></a> 

<a><s>1</s></a>