|
|
||
MSI Factory
An XML file located in C:\test.xml contains the following:
<root>
<first>My Value</first>
</root>
Action: Create element
File: C:\test.xml
Element path: //root/first
Element/Attribute name: first_child
Value: Created Value
Sequence: 1
Permanent: Unchecked
The above settings result in the following:
<root>
<first>My Value<first_child>Created Value</first_child></first>
</root>
An XML file located in [ProgramFilesFolder]My Product\test.xml contains the following:
<root>
<first>My Value</first>
</root>
Action: Set value
File: [ProgramFilesFolder]My Product\test.xml
Element path: //root/first
Element/Attribute name: first_attrib
Value: Attribute Value
Sequence: 1
Permanent: Unchecked
The above settings result in the following:
<root>
<first first_attrib="Attribute Value">My Value</first>
</root>
Note: If "Element/Attribute name" was left blank, "My Value" would have been replaced with "Attribute Value."
An XML file located in C:\test.xml contains the following:
<root>
<first first_attrib="Attribute Value">My Value</first>
</root>
Action: Delete value
File: C:\test.xml
Element path: //root/first
Element/Attribute name: first_attrib
Value:
Sequence: 1
Permanent: Unchecked
The above settings result in the following:
<root>
<first>My Value</first>
</root>
Note: You cannot delete the <first> element, however you can delete it's value (My Value) by leaving "Element/Attribute name" blank.
An XML file located in C:\test.xml contains the following:
<root>
<first>My Value</first>
</root>
Action: Create element
File: C:\test.xml
Element path: //root
Element/Attribute name: second
Value:
Sequence: 1
Permanent: Unchecked
Action: Create element
File: C:\test.xml
Element path: //root/second
Element/Attribute name: second_child
Value:
Sequence: 2
Permanent: Unchecked
Action: Create element
File: C:\test.xml
Element path: //root/second/second_child
Element/Attribute name: cn
Value: Value
Sequence: 3
Permanent: Unchecked
The above actions result in the following:
<root>
<first>My Value</first>
<second>
<second_child>
<cn>Value</cn>
</second_child>
</second>
</root>
An XML file located in C:\test.xml contains the following:
<root>
<first>My Value</first>
</root>
Action: Create
Node: Element
File: C:\test.xml
Element path: //root/first
Element/Attribute name: first_child
Value: Value
Verify path:
Timing: Install
Sequence: 1
The above settings result in the following:
<root>
<first>My Value<first_child>Value</first_child></first>
</root>
An XML file located in [ProgramFilesFolder]My Product\test.xml contains the following:
<root>
<first>My Value<first_child>Value</first_child></first>
</root>
Action: Delete
Node: Value
File: [ProgramFilesFolder]My Product\test.xml
Element path: //root/first/first_child
Element/Attribute name:
Value:
Verify path: //root/first/first_child
Timing: Install
Sequence: 1
The above settings result in the following:
<root>
<first>My Value<first_child></first_child></first>
</root>
An XML file located in C:\test.xml contains the following:
<root>
<first>My Value<first_child></first_child></first>
</root>
Action: Delete
Node: Element
File: C:\test.xml
Element path: //root/first
Element/Attribute name: first_child
Value:
Verify path: //root/first/first_child
Timing: Install
Sequence: 1
The above settings result in the following:
<root>
<first>My Value</first>
</root>
An XML file located in C:\test.xml contains the following:
<root>
<first>My Value</first>
</root>
Action: Create
Node: Value
File: C:\test.xml
Element path: //root/first
Element/Attribute name: Attribute
Value: AttributeValue
Verify path: //root/first
Timing: Install
Sequence: 1
The above settings result in the following:
<root>
<first Attribute="AttributeValue">My Value</first>
</root>
An XML file located in C:\test.xml contains the following:
<root>
<first>My Value</first>
</root>
Action: Create
Node: Value
File: C:\test.xml
Element path: //root/first
Element/Attribute name: Attribute
Value: AttributeValue
Verify path: //root/first
Timing: Install
Sequence: 1
Action: Delete
Node: Value
File: C:\test.xml
Element path: //root/first
Element/Attribute name: Attribute
Value:
Verify path: //root/first
Timing: Uninstall
Sequence: 1
After the install, the result is:
<root>
<first Attribute="AttributeValue">My Value</first>
</root>
After the uninstall, the result is:
<root>
<first>My Value</first>
</root>
WiX Help File: XmlConfig Element
WiX Help File: XmlFile Element
Learn More: Indigo Rose Software - MSI Factory - Buy Now - Contact Us