title: InstallShield XML File Changes - Change node attribute on install
body: <p>I am building a web service installation using InstallShield 2012, and I need to modify the Web.config file of my app based on user input.  I have introduced the PromptServerAndDatabase dialog just after the DestinationFolder dialog.  I have also set up the Web.config file in the XML File Changes view in InstallShield. Here is my basic web.config file structure:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;configuration&gt;
      &lt;configSections&gt;
          ...
      &lt;/configSections&gt;
      &lt;appSettings&gt;
          &lt;add key="DatabaseServer" value="sql08r2"&gt;sql08r2&lt;/add&gt;
          &lt;add key="DatabaseName" value="UserDatabaseName"&gt;UserDatabaseName&lt;/add&gt;
      &lt;/appSettings&gt;
      ...
  &lt;/configuration&gt;
  </code></pre>
  
  <p>At this time I can successfully change the literal value of a node, but I cannot change an attribute of a node.  </p>
  
  <p>Here's the structure within InstallShield in the XML File Changes view:</p>
  
  <p><img src="https://i.stack.imgur.com/zlCmP.png" alt="XML Structure"></p>
  
  <p>Also, here's the Advanced tab which is virtually identical for all three nodes.  Both nodes associated with Database Name use the same property, while the node for Server Name uses the property [SERVER_NAME] (not shown):
  <img src="https://i.stack.imgur.com/Ww8Di.png" alt="Advanced Tab"></p>
  
  <p>After running the installer the Web.config file is successfully updated.  The values of the DatabaseName and ServerName nodes are updated.  However, the value for the "value" attribute in the DatabaseName node is not, although it should reflect the same text as the node's actual value.  Once I perfect this I will need to duplicate it for the ServerName node, but I left that out for simplicity.</p>
  
  <p>I have done some additional research on this and I found this site which was very helpful overall, but didn't resolve this issue for me:</p>
  
  <p><a href="http://helpnet.installshield.com/installshield16helplib/XML-XPath.htm" rel="nofollow noreferrer">http://helpnet.installshield.com/installshield16helplib/XML-XPath.htm</a></p>
  
  <p>Maybe the answer is there and I am just missing it, IDK.</p>
  
  <p>Thanks for any help offered on this.</p>