Skip to main content
Version: v3

XmlConfig Element (Util Extension)

Description
Adds or removes .xml file entries. If you use the XmlConfig element you must reference WixUtilExtension.dll as it contains the XmlConfig custom actions.
Windows Installer references
None
Parents
Component, XmlConfig
Inner Text (xs:string)
This element may have inner text.
Children
Sequence (min: 1, max: 1)
  1. XmlConfig (min: 0, max: unbounded)
Attributes
NameTypeDescriptionRequired
IdStringIdentifier for xml file modification.Yes
ActionEnumerationThis attribute's value must be one of the following:
create
delete
 
ElementIdStringThe Id of another XmlConfig to add attributes to. In this case, the 'ElementPath', 'Action', 'Node', and 'On' attributes must be omitted. 
ElementPathStringThe XPath of the parent element being modified. Note that this is a formatted field and therefore, square brackets in the XPath must be escaped. In addition, XPaths allow backslashes to be used to escape characters, so if you intend to include literal backslashes, you must escape them as well by doubling them in this attribute. The string is formatted by MSI first, and the result is consumed as the XPath. 
FileStringPath of the .xml file to configure.Yes
NameStringName of XML node to set/add to the specified element. Not setting this attribute causes the element's text value to be set. Otherwise this specified the attribute name that is set. 
NodeEnumerationThis attribute's value must be one of the following:
element
value
document
 
OnEnumerationThis attribute's value must be one of the following:
install
uninstall
 
PreserveModifiedDateYesNoTypeSpecifies wheter or not the modification should preserve the modified date. Preserving the modified date will allow the file to be patched if no other modifications have been made. 
SequenceIntegerSpecifies the order in which the modification is to be attempted on the XML file. It is important to ensure that new elements are created before you attempt to add an attribute to them. 
ValueString The value to be written. See the Formatted topic for information how to escape square brackets in the value.  
VerifyPathStringThe XPath to the element being modified. This is required for 'delete' actions. For 'create' actions, VerifyPath is used to decide if the element already exists. Note that this is a formatted field and therefore, square brackets in the XPath must be escaped. In addition, XPaths allow backslashes to be used to escape characters, so if you intend to include literal backslashes, you must escape them as well by doubling them in this attribute. The string is formatted by MSI first, and the result is consumed as the XPath. 
See Also
Util Schema