See the samples directory and the unit test project for more examples of how to use the Xml Preprocessor.
The samples include:
- basic - This is a simple sample that demonstrates how to perform substitutions using a single environment switch property which is passed on the command line
- binding - Demonstrates using dynamic XPath and Regex properties
- database – Demonstrates reading properties from a database. Contains script to create tables and populate with sample data. These scripts are also used in unit tests.
- msbuild - Demonstrates using the new MSBuild tasks (introduced in 2.0.16)
- settings - This is a sample that demonstrates how to perform XML substitutions using multiple external settings files. It also contains the original Excel spreadsheet with the VBA Ctrl-W macro...this is obsolete in version 2.0 now that
the tool can consume the spreadsheets directly
- spreadsheet - Demonstrates using a spreadsheet saved as XML as the source for settings. This is new to XmlPreprocess version 2.0.
- wixsetup – Demonstrates two ways to use XmlPreprocess as a custom action in WiX (Windows Installer XML toolkit).