Paul- Thanks, that does help a lot. I didn't realize the terminology and was thinking it was a declaration due to the similiarity. I did find it as a node and now that I know I can cast it as an XProcessingInstruction object I can more easily get to it's data and target members.
Regards, Chris Christopher Painter, Author of Deployment Engineering Blog Have a hot tip, know a secret or read a really good thread that deserves attention? E-Mail Me --- On Mon, 8/24/09, Paul Dempsey <paul...@microsoft.com> wrote: > From: Paul Dempsey <paul...@microsoft.com> > Subject: RE: [WiX-users] Linq to XML and WiX > To: "Paul Dempsey" <paul...@microsoft.com>, > "chr...@deploymentengineering.com" <chr...@deploymentengineering.com>, > "General discussion for Windows Installer XML toolset." > <wix-users@lists.sourceforge.net> > Date: Monday, August 24, 2009, 4:07 PM > A quick Bing of Linq XML Processing > Instruction yields > > http://msdn.microsoft.com/en-us/library/system.xml.linq.xprocessinginstruction.aspx > > You'll have an XProcessingInstruction object in your doc > tree for the <?define ... ?> (and one for an <?if > ... ?> and one for an <?else ?> and one for an > <?endif?>, etc.). > > > hope that helps, > > --- Paul > > -----Original Message----- > From: Paul Dempsey > Sent: Monday, August 24, 2009 1:51 PM > To: 'chr...@deploymentengineering.com'; > wix-users@lists.sourceforge.net > Subject: RE: [WiX-users] Linq to XML and WiX > > WiX defines are implemented using XML Processing > Instructions <? ... ?>. I'm not sure that Linq-toXML > would get you much against a PI, other than perhaps a > string. The meaning of anything inside a PI is entirely up > to the XML application (WiX in tis case), so LINQ has no > idea that there's a name/variable pair in the string inside > the PI markers. > > Caveat: I haven't played with Linq, but my guess is that it > only understands XML things, and a PI is just a chunk of > syntax set off from normal XML. > > -----Original Message----- > From: Christopher Painter [mailto:chr...@deploymentengineering.com] > Sent: Monday, August 24, 2009 1:25 PM > To: wix-users@lists.sourceforge.net > Subject: [WiX-users] Linq to XML and WiX > > I've been learning how to use Linq against WiX source files > but one scenario has me stumped. Does > anyone have any tips on how to manipulate Wix preprocessor > statements? The XDocument.ToString() > clearly shows that the statements are loaded in memory and > the XDocument.Declaration shows the encoding and version but > I can't figure out how to get/set data such as: > > <?define MyVariable = "foo" ?> > > Christopher Painter, Author of Deployment Engineering Blog > Have a hot tip, know a secret or read a really good thread > that deserves attention? E-Mail Me > > > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal > Reports 2008 30-Day > trial. Simplify your report design, integration and > deployment - and focus on > what you do best, core application coding. Discover what's > new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > > ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users