Thanks.
Unfortunately I cannot use the native VBP "Write XML" step ,therefore I use a VBScript step .
Finally I found the proper way :
Set msxml = CreateObject("MSXML2.DOMDocument.6.0")
msxml.async = False
msxml.load "%VERSION_FILE%"
Set bt = vbld_AllMacros()("BUILD_TYPE")
Set vi = vbld_AllMacros()("VERS_INTERFACE")
Set vix = vbld_AllMacros()("VERS_INTERFACE_XMLNODE")
' update some attributes
UpdateNode msxml, bt.Value ,vix.Value ,vi.Value
' save the changes back out
msxml.save "%VERSION_FILE%"
' function to update the value of a node
Function UpdateNode(doc, bldtype,node, value)
Set elem = doc.selectSingleNode("builds/"&bldtype&"/"&node)
elem.text =value
wscript.Echo "Node 'builds/"&bldtype&"/"&node&"' updated to:"&elem.text
End Function
|