InstallAware for Windows Installer
 

Edit XML File

This command creates, updates or removes an .XML file element and/or attribute on the target system.

XML File Path

Type the full path to the XML file to edit, including the file name.

Backup Existing File

If an XML file with the given name exists on the specified path, check this box to back it up.

Backups are created based on the original file name, with the string .backup.X appended to the file name, where X is the first unique integer found, counting up from 0. This way, multiple simultaneous backups may coexist.

Backup XML files are not uninstalled during product removal.

File Encoding

Choose the encoding to apply to your XML file. The encoding is not enforced upon pre-existing XML files, which always inherit the existing encoding.

File Formatting

Choose the type of formatting to apply to your XML file. This formatting is also enforced upon existing XML files.

Preserve Whitespace

Check this box to preserve any whitespace that is found in an existing document.

Action

Choose the desired editing action from the drop down list. One or more elements may be edited in a single pass, based on the value of the Modify All Matching Elements field. One or more attributes may be edited in a single pass, based on the number of attributes defined in the Attributes field. The implications of each edit action is described below:

Create or Update will create new element(s) and attribute(s) only if they don't already exist, and update existing element(s) and attribute(s) where they are found. This option is the only way to add new attribute(s) to existing element(s), and modify the element text for existing element(s).

Update Only will perform the edits only on those element(s) and attribute(s) that already exist in the document. Elements and attributes that don't already exist will not be created.

Create Only will always create a new element (and thus, attribute(s)) even if one or more elements with the path specified in the Element Path field already exist in the document. Unless the Modify All Matching Elements field is selected, Create Only will create new elements, even when doing so would create an exact duplicate of an existing element, considering the values specified in the Element Text and Attributes fields.

Remove will remove element(s) matching the path specified in the Element Path field, together with all of their attributes - provided that the values specified in the Element Text and Attributes fields exactly match the corresponding values in the element(s) to remove.

Remove Only Attributes will only remove the attributes listed in the Attributes field, from those element(s) matching the path specified in the Element Path field. This option is the only way to remove attribute(s) from existing element(s) while preserving the element(s) themselves. Only matching attributes will be removed, as listed in the Attributes field. If no attributes have been listed in the Attributes field, all attributes will be unconditionally removed.

Element Path

Type the path to the element, including the root element. Start with the root element, and separate each following child element using the \ character.

Modify All Matching Elements

Check this box to process all elements matching the path specified in the Element Path field, in accordance with the action requested in the Action field.

Uncheck this box to modify only the first element matching the path specified in the Element Path field.

Element Text

Type the text for the element being edited in the document. This field is optional.

Attributes

Define one or more attributes for the element being edited in the document. Defining attributes is optional.