Change XML node values from WiX

后端 未结 1 1556
别跟我提以往
别跟我提以往 2021-01-14 17:46

I want to be able to change an XML node value from WiX. The XML structure looks like this:



        
相关标签:
1条回答
  • 2021-01-14 18:29

    Try omitting the Name attribute. Like this:

    <util:XmlConfig Id='SetSetting2' 
                    File='[#defaultSettings.xml]'
                    Action='create' 
                    Node='value'
                    ElementPath="//settings/setting[\[]@name='setting2'[\]]/@value"
                    Value="test"
                    On='install' 
                    PreserveModifiedDate='yes'
                    VerifyPath="//settings/setting[\[]@name='setting2'[\]]/@value/"/>
    

    See also XmlConfig Element. For attribute Name it says:

    Not setting this attribute causes the element's text value to be set. Otherwise this specified the attribute name that is set.

    0 讨论(0)
提交回复
热议问题