Hi, Did it work with Wix? http://support.microsoft.com/kb/313372: SYMPTOMS When you use the MSXML 4.0 Document Object Model (DOM) methods (selectNodes and selectSingleNode) to run XPath queries against an XML document that specifies a default namespace declaration, the matching node or nodes are not returned. CAUSE The default namespace declaration is not added to the Namespace names of the DOMDocument object, or a namespace prefix is not specified for the default namespace declaration when it is added to the Namespace names of the DOMDocument object. RESOLUTION Add the default namespace declaration to the Namespace names of the DOMDocument object by specifying a namespace prefix. To do this, use the setProperty method of the DOMDocument object to set the SelectionNamespaces internal property.
Dima. On Fri, Nov 7, 2008 at 8:22 PM, Rob Mensching <[EMAIL PROTECTED]> wrote: > You'll need to go through the MSXML documentation. I've only successfully > done this once myself and it took me a few hours of pouring over the MSXML > documentation to get the magical incantation just right. Unfortunately, I > don't have access to that code anymore and I don't have a few free hours to > read the MSXML documentation... > > -----Original Message----- > From: Dmitry Berkovich [mailto:[EMAIL PROTECTED] > Sent: Friday, November 07, 2008 08:38 > To: General discussion for Windows Installer XML toolset. > Subject: Re: [WiX-users] adding element with XmlFile to node with namespace > > Hi, > Does anyone has any example of XPath expression that added new node > to Xml with schema? > I tried all the variants, but it was not working. > Also I tried to execute expression with "XSLPattern" > (/SolutionProfile//[EMAIL PROTECTED]'Apps']//Modules) instead of "XPath". > But it adds new node wich contains empty namespace: > <ModuleInfo xmlns="" AssemblyFile="My.dll" /> which ignored by my > application since it contains empty namespace. > > Thanks in advance, > Dima > > On Fri, Nov 7, 2008 at 8:37 AM, Rob Mensching > <[EMAIL PROTECTED]> wrote: >> You need to use the same namespaces in your XPath. It's a pain. I usually >> write a little JScript and test my XPath using cscript until I get it right. >> >> -----Original Message----- >> From: Dmitry Berkovich [mailto:[EMAIL PROTECTED] >> Sent: Thursday, November 06, 2008 22:30 >> To: General discussion for Windows Installer XML toolset. >> Subject: [WiX-users] adding element with XmlFile to node with namespace >> >> Hi, >> I want add <ModuleInfo AssemblyFile="My.dll" /> node to this xml >> file under <Modules> node. >> <SolutionProfile xmlns="http://schemas.microsoft.com/pag/cab-profile/2.0"> >> <Section Name="Apps"> >> <Modules> >> </Modules> >> </Section> >> </SolutionProfile> >> >> >> I added those 2 lines under <Component>: >> <WixUtil:XmlFile Id="A1" Action="createElement" >> ElementPath="SolutionProfile/[EMAIL PROTECTED] = >> "Apps"[\]]/Modules" Name="ModuleInfo" >> File="[#ProfileCatalog.xml]" SelectionLanguage="XPath" Sequence="1"/> >> <WixUtil:XmlFile Id="A2" Action="setValue" >> ElementPath="SolutionProfile/[EMAIL PROTECTED] = >> "Apps"[\]]/Modules/ModuleInfo[\[]last()[\]]" >> Name="AssemblyFile" Value="My.dll" File="[#ProfileCatalog.xml]" >> SelectionLanguage="XPath" Sequence="2"/> >> >> >> Its works only if I remove namespace from XML files. Once I add >> namespace back to XML file - I have exception during install that node >> not found. >> Any idea? >> >> Thanks in advance, >> Dima >> >> P.S. - I am using Wix 3.0.4325.0 >> >> ------------------------------------------------------------------------- >> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge >> Build the coolest Linux based applications with Moblin SDK & win great prizes >> Grand prize is a trip for two to an Open Source event anywhere in the world >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >> _______________________________________________ >> WiX-users mailing list >> WiX-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/wix-users >> >> >> ------------------------------------------------------------------------- >> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge >> Build the coolest Linux based applications with Moblin SDK & win great prizes >> Grand prize is a trip for two to an Open Source event anywhere in the world >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >> _______________________________________________ >> WiX-users mailing list >> WiX-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/wix-users >> > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users