In your Value= line you will need to escape the square brackets.
XMLConfig mentions this in the Value Attribute Description column.

Opening bracket - [\[]
Closing bracket - [\]]

-----Original Message-----
From: Alexander op de Weegh [mailto:alexan...@ipa-tp.nl] 
Sent: Tuesday, August 31, 2010 3:50 AM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] How to change an entry using XmlConfig

Hi all,

I am not an expert on Xml, let alone XPath, so I am running into this
problem. With my application the following NHibernate.config file is
used:

<?xml version="1.0" encoding="utf-8" ?>
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
  <session-factory>
    <property
name="connection.provider">NHibernate.Connection.DriverConnectionProvide
r</property>
    <property
name="proxyfactory.factory_class">NHibernate.ByteCode.LinFu.ProxyFactory
Factory, NHibernate.ByteCode.LinFu</property>
    <property
name="connection.driver_class">NHibernate.Driver.MySqlDataDriver</proper
ty>
    <property
name="connection.connection_string">Database=schemaname;Data
Source=localhost;User Id=username;Password=password</property>
    <property name="dialect">NHibernate.Dialect.MySQLDialect </property>
  </session-factory>
</hibernate-configuration>

The configuration file is set up to be used from the Visual Studio
environment. In my Wix file, I have the following entry:
<util:XmlConfig Id='MySqlConnectionProperty'
File='[INSTALLDIR]\NHibernate.config'
                Action='create'
ElementPath='//hibernate-configuration/session-factory/propert...@name="
connection.connection_string"\]'
                Node='value' Value='Database=[MYSQLSCHEMA];Data
Source=[MYSQLHOSTNAME];User Id=[MYSQLUSERNAME];Password=[MYSQLPASSWORD]'
                Sequence='1' On='install'/>

With this XmlConfig entry, I try to modify the value of the connection
string in the NHibernate.config file according to the settings specified
by the user during the installation. The MYSQLxxx parameters are
collected in one of the custom dialogs.

During the run of the Xml linker, the following error occurs:
LGHT0204 : ICE03: Invalid format string; Table: XmlConfig, Column:
ElementPath, Key(s): MySqlConnectionProperty

Can anyone help me out here? Thanks in advance,

Met vriendelijke groeten / With kind regards,
Alexander op de Weegh

Office:          +31(0)226-335023
Mobile:         +31(0)6-20138301

IPA Total Productivity
Kosterij 4
1721 PN Broek op Langedijk
The Netherlands

www.ipa-tp.nl
of kijkt u eens op www.blean.nl van onze partner B-Lean voor het trainen
en implementeren
van productiemethodieken en het verbeteren van uw productiviteit.


------------------------------------------------------------------------
------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users



------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to