Hello,
In order to achieve this you can try the following workaround:
- Go to "Files and Folders" page and add your XML file (e.g. myfile.xml) as a regular file (using [Add Files] toolbar button).
- Under myfile.xml containing folder create two sub-folders and from their "Edit Folder -> Properties" tab enable the "Install folder content into the parent folder" option.
- Select the first sub-folder and create a new XML file (having the same name as your myfile.xml), using the [New XML File] toolbar button, containing the "OptionA" element:
<add type="OptionA">
<attribute name="value1" value="[PROPERTY1]"/>
<attribute name="value2" value="[PROPERTY1]"/>
</add>
- Select the new created XML file and press "F8" key shortcut.
- In the "Condition" field, from "Component Properties" right pane, of the containing file component use a condition like this:
- Select the second sub-folder and create a new XML file (having the same name as your myfile.xml), containing the "OptionB" element:
<add type="OptionB">
<attribute name="value3" value="[PROPERTY3]"/>
<attribute name="value4" value="[PROPERTY4]"/>
</add>
- Select the new created XML file and press "F8" key shortcut.
- In the "Condition" field of the containing file component use a condition like this:
- Build and run your project.
All the best,
Daniel
FOLLOW US
Get the latest news in Application Packaging