XPaths and <??>

I have a WIX file that I need to modify using MSBuild. It starts like this:

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
     xmlns:iis="http://schemas.microsoft.com/wix/IIsExtension">

  <?--... Removed Params ...-->

  <?define ProductVersion = "1.0.1"?>

  <?--... Removed Params ...-->

  <Product Id='$(var.ProductCode)'
    UpgradeCode='$(var.UpgradeCode)'
    Name='$(var.AppName)' Language="1033" Version='$(var.ProductVersion)'
    Manufacturer='$(var.Manufacturer)'>
    <Package Id='$(var.PackageCode)' InstallerVersion="200" 
    Compressed="yes" />

  <?--... Rest of the WIX XML file ...-->

      

My problem is I don't know what the XPath will be for <?define ProductVersion = "1.0.1"?>

. Is there a way to reference this via XPath so I can use the SDC SetValue MSBuild task to change it? It's not a node (I think), so I'm not sure how to reference it.

Vaccano

0


source to share


4 answers


It looks like it /Wix/processing-instruction('define')

might work for XPath (whether MSBuild recognizes it, I don't know).



By replacing this in SketchPath , I was able to click on it and test various XPaths to see what would select this item.

+3


source


Another approach would be to define the parameter via the command line for the candlestick:



candle -dProductVersion=1.0.1

      

+4


source


// statement-processing ('define')

0


source


<?define>

is a node processing instruction, so you should be able to refer to it using an XPath expression like

//processing-instruction('define')

      

0


source







All Articles