Hello,
As an addendum to my previous reply, for now as a workaround you can also try to proceed like this:
1. add your XMl file (e.g. "test.xml") in "Files and Folders" page containing only the elements which will be always installed
2. under the current parent folder of your XML file create a new subfolder
3. enable the
"Install folder content into the parent folder" option for the created subfolder
4. in the subfolder create a new "test.xml" file which will contain only the elements you need to add/update based on condition
5. assign the XML file from the subfolder to a component which will be installed conditionally
6. rebuild and test the installation
All the best,
Daniel