Hi, You need to use msi formatted string escaping in the xpath as @ElementPath is a formatted string. See http://msdn.microsoft.com/library/aa368609(VS.85).aspx
[ = [\[] ] = [\]] <util:XmlConfig Id='MySqlConnectionProperty' File='[INSTALLDIR]\NHibernate.config' Action='create' ElementPath='//hibernate-configuration/session-factory/property[...@name ="connection.connection_string"[\]]' Node='value' Value='Database=[MYSQLSCHEMA];Data Source=[MYSQLHOSTNAME];User Id=[MYSQLUSERNAME];Password=[MYSQLPASSWORD]' Sequence='1' On='install'/> Dave -----Original Message----- From: Alexander op de Weegh [mailto:alexan...@ipa-tp.nl] Sent: 31 August 2010 11:50 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 </pre> <BR style="font-size:4px;"> <a href = "http://www.sdl.com"><img src="http://www.sdl.com/images/email logo_150dpi-01.png" alt="www.sdl.com" border="0"/></a> <BR> <font face="arial" size="2"><a href = "http://www.sdl.com" style="color:005740; font-weight: bold">www.sdl.com</a></font> <BR> <BR> <font face="arial" size="1" color="#736F6E"> <b>SDL PLC confidential, all rights reserved.</b> If you are not the intended recipient of this mail SDL requests and requires that you delete it without acting upon or copying any of its contents, and we further request that you advise us.<BR> SDL PLC is a public limited company registered in England and Wales. Registered number: 02675207.<BR> Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire SL6 7DY, UK. </font> ------------------------------------------------------------------------------ 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