*Sigh* I was afraid you'd say something like that. Ok, I'll just have to figure it out then, and find a way to test for the existence of the node. My XPath level of expertise is a step shy of beginner ;)
Thanks the input. /Thomas -----Original Message----- From: Blair [mailto:os...@live.com] Sent: 14. oktober 2009 17:24 To: 'General discussion for Windows Installer XML toolset.' Subject: Re: [WiX-users] Is there an easier way of adding nodes andattributes to an xml file? The actions supplied with the toolset are of a necessity made as generic as possible to be applicable to as many users as possible. Each action needs to be testable to ensure that future code modifications won't break existing uses, and testing resources are not unlimited. Those things constrain the provided actions to do one thing at a time. The source code is available to allow you to modify the actions to accomplish whatever your needs are (or to hire that task out). -----Original Message----- From: Thomas Due [mailto:thomas....@scanvaegt.dk] Sent: Tuesday, October 13, 2009 11:00 PM To: wix-users@lists.sourceforge.net Subject: [WiX-users] Is there an easier way of adding nodes and attributes to an xml file? During my install I need to add some nodes to an xml file. These nodes will in addition have up to two attributes. The xml file itself is fairly simple with no really structure, just a single root and a bunch of children. Basically the xml file is structured like this: <?xml version="1.0" encoding="utf-8"?> <Storage> <StorageItem name=".." /> <StorageItem name=".." value="..."/> <StorageItem name=".." value="..."/> ... </Storage> As far as I can tell, the way I add nodes and attributes to this, is like this: <util:XmlConfig Id="NodeId" Name="StorageItem" File="[INSTALLDIR]configuration.xml" ElementPath="/Storage" Node="element" On="install" Action="create"> <util:XmlConfig Id="FirstAttributeId" Name="Name" Value="Checked" File="[INSTALLDIR]configuration.xml" ElementId="NodeId" /> <util:XmlConfig Id="SecondAttributeId" Name="Value" Value="True" File="[INSTALLDIR]configuration.xml" ElementId="NodeId" /> </util:XmlConfig> Of course, I can probably write an xml code snippet to help in this, but still... This seems rather cumbersome, is that really the best way to add nodes and attributes to an xml file? It seems kinda excessive that I have to have 3(!!) XmlConfig elements in order to add a single node with two attributes. Is there any way I can make this more streamlined? /Thomas ------------------------------------------------------------------------ ---- -- Come build with us! The BlackBerry(R) 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/devconference _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) 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/devconference _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users