
bvarady1.5524928676532185E12 asked a question.
XML File Text Substitution
Hi all,
I've spent all morning trying to figure out how to do a simple XML change, but have had no luck thus far. I hope someone can explain to me the steps I need to take to accomplish what I need. So, thanks in advance.
Very simply, I'm installing a file called x.config containing:
<add name="DatabaseInformation"
providerName="System.Data.SqlClient"
connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=data;Integrated Security=True" />
On the fly, I need to simply change the "SQLEXPRESS" text to a variable value I read from an ini file, for example "hello"; So, I read from the ini during the install, get the value, and then need to write it to the XML file in the line above.
This is within an InstallScript project.
Can anyone help? I've not playes with XML files before.
Thanks!