Advanced Tab for an XML File

InstallShield 2020 » XML File Changes View » XML File

Project:The XML File Changes view is available in the following project types:

Basic MSI
InstallScript MSI
Merge Module
MSI Database

The Advanced tab exposes the following settings for an XML file in the XML File Changes view.

XML file options

The following file settings are available at run time:

XML File Settings Available at Run Time



Always create XML file if it does not already exist

If an XML file does not exist on the target system at run time, then one will be created based on the specifications for that file in the XML File Changes view.

Remove XML file on uninstall

Select this check box if you want to remove the XML file on the target system upon uninstallation.

Format XML after changes

If you want the XML file to be formatted after the run-time changes are made to the file, select this check box. When formatting the file, the installation adds indentations to the file and replaces empty-element tags with start tags and end tags.

Note that the formatting may cause problems for web.config files, so you may want to clear this check box for the XML file.

Use Absolute XPath

The path of a node in an XML document can be either absolute or relative. Absolute paths start at the root. When adding a new child element to an XML file that has the same name as a child element in an existing parent element, it is necessary to use the absolute path. To do this, you select the Use Absolute XPath option.

Selected—If this option is selected, Absolute XPath will be used when adding a child element.
Not selected—if this option is not selected, Generic XPath will be used when adding a child element. By default, the Use Absolute XPath option is not selected.

Encoding used for a new file

Specify the encoding that should be used for a new XML file.

Note that if the XML file is already present on the target machine, or if it is being installed as part of your installation, the installation uses the encoding that is specified in the XML file, rather than the encoding that is specified in this setting.

The encoding value that you specify is used only if you have used the XML File Changes view to create the entire XML file.

XPath Query

This read-only grid displays the XPath expressions to be executed on the target machine at run time based on the XML changes you have configured in the XML File Changes view.

Tip:For more information about XPath expressions, consult the World Wide Web Consortium (W3C) Web site as well as the Things to Know and Avoid When Querying XML Documents with XPath article MSDN Library.

See Also