Hi Thomas, for adding some nodes and attributes in already existing xml file you can write a custom action using XmlDoucument,XmlElement, XmlAttribute. If xml file not exist then it can be created using XmlWriter, for this purpose you can use FileStream.
Best Regards Adnan 2009/10/14 Thomas Due <thomas....@scanvaegt.dk> > 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