I am trying to clear the wxs file generated by heat.exe using xml conversions.
The following is an example of the output of the heat.exe file.
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<DirectoryRef Id="APPFOLDER">
<Component Id="cmp78E9FF58917B1844F3E9315A285F3147" Guid="SOME-GUID">
<File Id="fil093D6D7CB723B5B62730D7B4E575F154" KeyPath="yes" Source="PQR.Some.dll" />
</Component>
<Component Id="cmp0B084126FAE7577FD84DB29766AC6C2B" Guid="SOME-GUID">
<File Id="filB20C8708D7EB02EDFBCC4D70F9FE7F8A" KeyPath="yes" Source="ABC.Another.dll" />
</Component>
<Component Id="cmp83BB1954DECD7D949AAE4ACA68806EC3" Guid="SOME-GUID">
<File Id="fil0E29FBFF7DB39F307A2EE19237A0A579" KeyPath="yes" Source="ABC.OneMore.dll" />
</Component>
</DirectoryRef>
</Fragment>
<Fragment>
<ComponentGroup Id="AppFiles">
<ComponentRef Id="cmp78E9FF58917B1844F3E9315A285F3147" />
<ComponentRef Id="cmp0B084126FAE7577FD84DB29766AC6C2B" />
<ComponentRef Id="cmp83BB1954DECD7D949AAE4ACA68806EC3" />
</ComponentGroup>
</Fragment>
</Wix>
I want to remove component nodes whose child node file has a Source attribute containing the string "ABC". I know how to find such nodes using the correct matching patterns. Therefore, before uninstalling the node component, I want to save the identifier of the component, and then use it to remove the ComponentRef node with the identifier that I just wrote down.
, XML? , -, say 'X', Id of Component node, , "X", ComponentRef.