Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] General Discussion
Register FAQ Community Calendar Today's Posts Search

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 02-14-2012, 07:02 AM
teognost teognost is online now
Registered User
 
Join Date: 05-25-2004
Location: Prague,Czech Republic
Posts: 200
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
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 03:21 AM.


Copyright © 1999-2023 Kinook Software, Inc.