Close

WIX – edit xml file with the help of xpath notation

We can apply changes to an xml file, we can use the xmlfile element which is part of the Util Extension:

http://wixtoolset.org/documentation/manual/v3/xsd/util/xmlfile.html

The following copies the file across and makes a change to an element's value:






Note: It singles out en element that has an attribute called "name", and has value "connection.connection_string".

Note: The "[\[]" is an escaped opening square bracket, also "[\]]" is an escaped closing square bracket. That's because in wix, square brackets have a special meaning, i.e. it indicates a variable. However we are using the square brackets as part of xpath notation, that's why they needed to be escaped.

http://wix.tramontana.co.hu/tutorial/com-expression-syntax-miscellanea/xml

http://wixtoolset.org/documentation/manual/v3/xsd/util/xmlfile.html