Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] General Discussion

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 05-07-2004, 12:18 PM
VBuild_Rookie VBuild_Rookie is online now
Registered User
 
Join Date: 05-07-2004
Posts: 23
replacing sections in XML

I want to be able to replace sections of the XML file using visual build. Is this possible I have no clue on how to do this but I just need to change sections of config files (.NET) for diff enviroments

<appSettings>
<add key="DatasourceConnection" value="blah lah" />
<add key="ServerlessLDAPBinding" value="blah" />
<add key="ActiveDirectoryServer" alue="blah"/>
<add key="NewtonUsersOU" value="blah"/>
<add key="NewtonUsersOUContainer" value="blah"/>
</appSettings>

WITH
<appSettings>
<add key="DatasourceConnection" value="NEW blah lah" />
<add key="ServerlessLDAPBinding" value="NEW blah" />
<add key="ActiveDirectoryServer" alue="NEW blah"/>
<add key="NewtonUsersOU" value="NEW blah"/>
<add key="NewtonUsersOUContainer" value="NEW blah"/>
</appSettings>
Reply With Quote
  #2  
Old 05-07-2004, 02:35 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,003
The attached sample uses MSXML to do this.
Attached Files
File Type: bld write_xml.bld (2.5 KB, 1720 views)
Reply With Quote
  #3  
Old 06-21-2004, 01:00 PM
jcox jcox is online now
Registered User
 
Join Date: 08-06-2003
Posts: 6
Can we parse the values out into Temp Macros?
Reply With Quote
  #4  
Old 06-21-2004, 06:10 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,003
This sample demonstrates writing to an XML file, not reading. If you want to provide values to be written from temporary macros, just replace the strings with macro references, for instance:

UpdateAttribute msxml, "DatasourceConnection", "%MY_MACRO_NAME%"

As far as parsing values out of an XML file into temporary macros, this sample demonstrates that: http://www.kinook.com/Forum/showthread.php?threadid=237
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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 08:49 AM.


Copyright © 1999-2023 Kinook Software, Inc.