I'm having a problem writing a value to an XML file using XmlConfig (WiX 
3.0.4401). Here is a model XML file with the structure I have:
 
<configuration>
  <myComponent>
    <section name="DatabaseSettings">
      <Default server="foo" database="bar"/>
    </section>
    <section name="MoreSettings">
      ...
    </section>
  </myComponent>
</configuration>
 
I need to set the server attribute of the Default element. Here is my WiX code 
for XmlConfig:
 
<util:XmlConfig Id="WriteServerConfigValue"
        Action="create"
        On="install"
        Node="value"
        ElementPath="/configuration/myComponent/[EMAIL 
PROTECTED]'DatabaseConnections'[\]]/Default"
        VerifyPath="/configuration/myComponent/[EMAIL 
PROTECTED]'DatabaseConnections'[\]]/Default"
        Name="server"
        Value="[CORRECTDATABASESERVER]"
        File="[#MyXmlConfigFile]"
        Sequence="1" />

When I try to run the resulting .msi, I receive an error that says "Failed to 
find node:
/configuration/myComponent/[EMAIL PROTECTED]'DatabaseConnections]Default in XML 
file
<My file name>, system error: -2147467259"
 
What concerns me is that my path delimiter ('/') is getting lost between my 
section "name" attribute and my child "Default" element. Am I escaping 
something wrong? Is my xpath wrong (I don't think it is, but I'm not the 
greatest at xpath)? Most of the samples I've seen for XmlConfig stop after 
finding a node with an attribute, not continuing to a child node thereof.
 
--Jim Evans
Numara Software
 
 
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to