It appears that there isn't a facility to set up XML files differently depending on choices that users have made while answering questions in dialog boxes - or at least there doesn't seem to be an easy way to do it.
For example, something as simple as connection strings for SQL Server databases... They look different depending on whether the user chooses to implement a single node database instance, a mirrored database or an AlwaysOn Availability Group. It would be nice to be able to ask the user how the database is implemented, have them browse for servers and databases, then in the XML file, have it test the implementation type and use that to create a usable connection string.
This one is doable by text substitution since all of them need something similar but different, but it easily gets very clumsy when entire sections need to be included based on choices made in the dialogs.
(how to do it)
We ask the implementation type before we ask for server names, etc., and we have a final "verify all your choices" screen before we do the install. Attached to the "Install" button on the "Verify" screen, we create a "DB_SERVER_CONNECT_PART" string which might end up looking like "Data Source=SCRAPPLE;Failover Partner=VEGEMITE" based on the choices made during the dialogs. If it were a single database server solution, the string might be set to something like "Data Source=HAGGIS". In the XML file, this would get substituted where the database server name would go in the connect string.
(the problem)
What do you do when it gets more complex, as in you need to leave out or add in an entire section based on options selected?