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

Reply via email to