Releases: lorenh/xmlpreprocess
Version 3.2
What's new
- Added foreach feature
- Fixed issue when spreadsheet was edited by Excel on Mac
Foreach
Added foreach feature to automatically expand all settings that contain a common prefix.
For example, if in a spreadsheet you have settings named
Setting name | value |
---|---|
appconfig_setting1 | value1 |
appconfig_setting2 | value2 |
appconfig_setting3 | value3 |
the following markup could be used to expand them.
<appSettings>
<!-- #ifdef _xml_preprocess -->
<!-- #foreach(appconfig_*) <add key="${_.KeyNoPrefix}" value="${_.Value}"/> -->
<!-- #else -->
<add key="someDevSetting" value="1"/>
<!-- #endif -->
</appSettings>
Would expand to this:
<appSettings>
<!-- #ifdef _xml_preprocess -->
<!-- #foreach(appconfig_*) <add key="${_.KeyNoPrefix}" value="${_.Value}"/> -->
<!-- #else -->
<add key="setting1" value="value1"/>
<add key="setting2" value="value2"/>
<add key="setting3" value="value3"/>
<!-- #endif -->
</appSettings>
This can be nice to use the spreadsheet to completely drive some lists of related settings without having to touch your config file to add each one.
Fix for Excel on Mac
When spreadsheetXML 2003 is edited by Excel on a Mac, it removes a processing instruction that was being used to validate the file.
<?mso-application progid="Excel.Sheet"?>
This check has been removed.
Version 3.0
Initial release after moving to GitHub from Codeplex. Moved to .NET 4.5 and Visual Studio 2015, cleaned up some unused things. This contains no functionality changes from the Codeplex version.