Question

I've just used the WiX XmlFile element with an ElementPath that matches multiple XML nodes and it just updates the first one, rather than all of the ones that match. Is this a bug in WiX? Can anyone suggest a workaround for this?

Was it helpful?

Solution

The current XmlFile design only updates one. Seems like a good feature request for the WiX toolset though.

OTHER TIPS

If the multiple elements have different values for a certain attribute (e.g. you have 5 elements, each with a different Name attribute), you can just repeat setting the value for each of them (using Formatted paths).

If that's not the case, I guess you could use some ugly tricks to get around it. For example, change the node text of each node you have allready set the wanted value to, and then you can change the next instance, for it becomes the first. Of course, when you finish going over all the instances, change the text back...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top