Because the Wix document has a namespace your Xpath expression must also reference the namespace. Remember that xpath matches on fully qualified names. Try the following (sorry in advance if I screwed up the syntax) <xmlpeek file="${pwd}\MSI1.wxs" xpath="/x:Wix/x:Product/@x:Version" property="xml.property"> <namespaces> <namespace prefix="x" url=" http://schemas.microsoft.com/wix/2003/01/wi" /> </namespaces> </xmlpeek> > -----Original Message----- > From: Kedziora, Rebecca [mailto:[EMAIL PROTECTED] > Sent: Thursday, October 20, 2005 4:44 PM > To: nant-users@lists.sourceforge.net > Subject: RE: [Nant-users] Xpath guru needed... > > This is what I am using in my build file to get the Version but it > doesn't work. > > > <property name="xml.property" value="unknown" /> > > <target name="version" description="Get and Update the version in > SMC.WXS file."> > <xmlpeek file="${pwd}\MSI1.wxs" xpath="/Wix/Product/@Version" > property="xml.property"> > </xmlpeek> > <echo message="${xml.property}"/> > </target> > > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Kedziora, > Rebecca > Sent: Thursday, October 20, 2005 3:36 PM > To: nant-users@lists.sourceforge.net > Subject: RE: [Nant-users] Xpath guru needed... > > > I opened up this document in IDE and the XML editor and it looks fine. > > Even with this document I get the same erros that the node is not valid. > > > > -----Original Message----- > From: Martin Gainty [mailto:[EMAIL PROTECTED] > Sent: Thursday, October 20, 2005 3:28 PM > To: Eric Fetzer; Kedziora, Rebecca; nant-users@lists.sourceforge.net > Subject: Re: [Nant-users] Xpath guru needed... > > > <?xml version="1.0"?> > <Wix xmlns="http://schemas.microsoft.com/wix/2003/01/wi"> > <Product Id="431EB16A" Name="Management Center" Language="1033" > Version="3.0.0.100" Manufacturer="Corporation"/> </Wix> > > Note the end tag /> at the end of the <Product Tag > > If you want a way to catch malformed XML errors just open the xml > document > in your IDE > OR Open your XML document with XML Parser such as XMLSpy available at > the > Altova XMLSpy site http://www.altova.com/download_spy_enterprise.html > > Hope this works for you, > Martin - > Etats Unis > ----- Original Message ----- > From: "Eric Fetzer" <[EMAIL PROTECTED]> > To: "Kedziora, Rebecca" <[EMAIL PROTECTED]>; > <nant-users@lists.sourceforge.net> > Sent: Thursday, October 20, 2005 4:03 PM > Subject: Re: [Nant-users] Xpath guru needed... > > > > /Wix/Product/[EMAIL PROTECTED]'431EB16A']/@Version > > > > > > > > --- "Kedziora, Rebecca" > > <[EMAIL PROTECTED]> wrote: > > > >> Anyone, > >> > >> Trying to use the xmlpeek to retrieve the value of > >> an attribute. > >> > >> I am trying to get the Version: > >> > >> <?xml version="1.0"?> > >> > >> <Wix > >> xmlns="http://schemas.microsoft.com/wix/2003/01/wi"> > >> > >> <Product Id="431EB16A" Name="Management Center" Language="1033" > >> Version="3.0.0.100" Manufacturer="Corporation"> > >> > >> </Wix> > >> > >> I tried several ways to use xpath and it keeps > >> tellings me "No matching > >> nodes found for Xpath expression". > >> > >> Does anyone know how to get xpath to work here? > >> > >> Thanks, > >> > >> Rebecca > >> > >> > >> > >> > > > > > > > > > > __________________________________ > > Yahoo! Music Unlimited > > Access over 1 million songs. Try it free. > > http://music.yahoo.com/unlimited/ > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by: > > Power Architecture Resource Center: Free content, downloads, > > discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl > > _______________________________________________ > > Nant-users mailing list > > Nant-users@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/nant-users > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: > Power Architecture Resource Center: Free content, downloads, discussions, > and more. http://solutions.newsforge.com/ibmarch.tmpl > _______________________________________________ > Nant-users mailing list > Nant-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nant-users
------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ Nant-users mailing list Nant-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-users