XML Element Settings Tab

Element Settings

Text

Specify the element or comment text.

NoteThis string is of Formatted Type and can be edited using Smart Edit Control. Also you can localize it.

For example, if you need to insert in the XML file an element in the form <node>text content</node>, set the Text for the "node" element to "text content".

ImportantWhen an XML element is in update mode, the text content is also updated. However, when the XML element being updated has mixed content with several text regions, the new text specified here will be appended to the element content.

Install

In this section you can specify the installation behavior of the XML element.

Create element if it doesn't already exist

If a matching element is not found and this option is enabled, the element will be created in the desired location, under the specified parent.

If the element is found:

  • Update:
    • First matching
    • If several matching elements are found and this option is enabled, only the first occurrence will be updated.
    • All matching
    • If several matching elements are found and this option is enabled, all the occurrences are updated with the same changes.
  • Add as new sibling
  • If matching elements are found and this option is enabled, the element will be added as a detected node's sibling.

TipIf none of the above options are set, the element is ignored, meaning that is neither created nor updated. You can choose to use these settings if you need to navigate in an XML tree in order to reach a specific node. By using this method you can reach a sibling node without modifying the parent node(current node).

Warning!In order to enhance the localizing precision of matching elements, you can use identifier attributes to pinpoint an exact element from the file, in case several nodes have the same ancestors.

For example, if the target XML file looks like:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<CONFIG Name="Default" CreateVersion="1.0" Version="1.0" Type="ReadOnly">
  <OPTION type="single" name="ExtractLinkInfo">
    <PARAM value="true"/>
  </OPTION>
  <OPTION type="single" name="ParseINIFiles">
    <PARAM value="true"/>
  </OPTION>
  <OPTION type="single" name="PromptAfterInstall">
    <PARAM value="false"/>
  </OPTION>
  <OPTION type="single" name="ExtractVersionInfo">
    <PARAM value="false"/>
  </OPTION>
  <OPTION <type="multi" name="FileExtWithVersionInfo">
    <PARAM value="dll"/>
    <PARAM value="exe"/>
    <PARAM value="ocx"/>
  </OPTION>
</CONFIG>

and you want to update the element:

 <OPTION type="single" name="ParseINIFiles">
   <PARAM value="true"/>
 </OPTION>

by changing the value of "PARAM" to "false", in order to identify the desired "OPTION" node from the file, you can specify the attribute "name" with the value "ParseINIFiles" (for the "OPTION" element) as being an identifier attribute.

TipYou can specify several attributes as identifiers for an XML element.

Caution!XML Comments are always inserted, and never updated.

Condition

The condition to create this element on install. Edit this field using Smart Condition Edit Control.

Uninstall

Remove element on uninstall

If it exists, the element will be removed when the attached component is uninstalled.