Hi,
I'm new to Wix 3.0 and am trying to use it to insert new elements into a config
XML file. The format of the file is something like this:
<stuffs>
<stuff>
<name>first stuff</name>
</stuff>
<stuff>
<name>more stuff</name>
</stuff>
</stuffs>
I want to add another stuff element to the end of the file and am trying to use
XMLFile as follows:
<DirectoryRef Id="ConfigXML">
<Component Id="XMLFile" Guid="My-GUID">
<File Id="SettingsXmlFile" Name="config.xml"
Source="c:\path\to\xmlfile\config.xml" DiskId="1" Vital="yes" />
<util:XmlFile Id="AddStuff" Action="createElement"
ElementPath="/stuffs" Name="stuff"
File="c:\path\to\xmlfile\config.xml " Sequence="1"/>
<util:XmlFile Id="AddStuffName" Action="createElement"
ElementPath="/stuffs/stuff[\[]last()[\]]" Name="name" Value="new stuff"
File=" c:\path\to\xmlfile\config.xml " Sequence="2"/>
</Component>
</DirectoryRef>
I've tried escaping and not escaping the Xpath expression to get the last stuff
element, which is the last one added, but all I get are errors. I've tried all
sorts of kludges to reference the new stuff element but to no avail. This is
with the 3.0.5419.0 build of WiX 3.0. I can't get any xpath expression to
resolve at all...
What am I doing wrong?
Thanks
________________________________
Compass Limited
Compass House, 60 Priestley Road, Guildford, Surrey GU2 7YU
Compass Limited is registered as a company in England and Wales
Company Registration No. 1714804 VAT Registration No. GB391315557
Tel: +44 (0)1483 514500 Fax: +44 (0)1483 302279
www.compassmc.com
This message may contain confidential and/or privileged information. If you are
not the addressee or authorised to receive this for the addressee, you must not
use, copy, disclose, or take any action based on this message or any other
information herein. If you have received this message in error, please advise
the sender immediately by reply e-mail and delete this message. Thank you for
your co-operation.
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users