|
#1
|
|||
|
|||
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> |
#2
|
|||
|
|||
The attached sample uses MSXML to do this.
|
#3
|
|||
|
|||
Can we parse the values out into Temp Macros?
|
#4
|
|||
|
|||
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 |
|
|