Book Image

WiX Cookbook

By : Nicholas Matthew Ramirez
1 (1)
Book Image

WiX Cookbook

1 (1)
By: Nicholas Matthew Ramirez

Overview of this book

Table of Contents (20 chapters)
WiX Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Inserting inner text into an XML element


In some cases, an XML file might use the inner text of an element to configure a setting. For example, if you view the properties of an ASP.NET project, there's a Settings tab where you can add rows of named application settings:

These settings will be stored in Web.config under the applicationSettings node:

<configuration>
  <!--Other elements omitted for brevity-->

  <applicationSettings>
    <MyWebApp.Properties.Settings>
      <setting name="MySetting" serializeAs="String">
        <value>ValueA</value>
      </setting>
    </MyWebApp.Properties.Settings>
  </applicationSettings>
</configuration>

As you can see, the value of the setting is stored as inner text in an element called value. In this recipe, we'll update this inner text so that instead of saying ValueA, it will say ValueB.

Getting ready

To prepare for this recipe, perform the following steps:

  1. Create a new setup project and...