fyi - in my wix sources I'm able to successfully set/use util:xmlfile 
elementpath values with attribute search qualifiers using the following 
escaping syntax.

   <util:XmlFile ... ElementPath='//[EMAIL PROTECTED]"third"\]'/>

You can use alternatively:

   <util:XmlFile ... ElementPath="//[EMAIL PROTECTED]&quot;third&quot;[\]]" />


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Evans, Jim
Sent: Tuesday, August 12, 2008 11:27 AM
To: wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] WiX-users Digest, Vol 27, Issue 36

The workaround mentioned in the bug you supplied the link to works around my 
problem nicely. Thanks for the heads-up.

________________________________

From: Meyer, Shawn [mailto:[EMAIL PROTECTED]
Sent: Tue 8/12/2008 12:21 PM
To: wix-users@lists.sourceforge.net
Cc: Evans, Jim
Subject: RE: WiX-users Digest, Vol 27, Issue 36



I saw an old bug similar to your problem here
http://osdir.com/ml/windows.devel.wix.devel/2006-07/msg00017.html

There is a suggested work around that may help diagnose if the xpath is
parsed due to the brackets.

A work around to avoid this bug is to use a property for
the XPath value. So if your WXS file is:

   <XmlFile ... ElementPath='//[EMAIL PROTECTED]"third"\]'/>

You can use alternatively:

   <Property Id="THIRDNODE">[EMAIL PROTECTED]"third"]</Property>

   <XmlFile ... ElementPath='//add[THIRDNODE]'/>

Using this work around, the Xml node is correctly
processed by WiX.


Let us know what you find.


Date: Tue, 12 Aug 2008 10:35:03 -0400
From: "Evans, Jim" <[EMAIL PROTECTED]>
Subject: [WiX-users] XmlConfig XPath problem
To: <wix-users@lists.sourceforge.net>
Message-ID:

<[EMAIL PROTECTED]>
Content-Type: text/plain;       charset="iso-8859-1"

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]'DatabaseConnec
tions'[\]]/Default"

VerifyPath="/configuration/myComponent/[EMAIL PROTECTED]'DatabaseConnect
ions'[\]]/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


-------------------------------------------------------------------------
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