Hi Guido,
In order to remove tags conditionally on install in an easier way, you can follow the steps below:
- create an "XML Edit" file for each tag (5 in your case), place them in different subfolders and install them in the parent folder
- each XML file will contain only the "path" to the element that should be removed and its attributes
- go in the "Attributes" tab and edit the attribute that you want to remove like below:
- Name: <attribute name>
Value: (not important)
Operation: Remove
Execute update: on install
- install each XML based on a condition
- build and run the project
In this case if only one condition is true, only one element will be removed, if more conditions are true, more elements will be removed.
However, this workaround does not remove the attribute completely, only its value will be removed and this may be acceptable or not depending on your application's requirements.
Another workaround (maybe better) would be to create "Text File Updates" instead of "XML Edit" files and install them based on the same conditions. A "Text File Update" would be configured to search for:
and replace it with
Code: Select all
[EMPTY_PROPERTY] (you can use the name of a property that does not exist)
Let us know if this helped.
Best regards,
Eusebiu