Still struggling with this problem. Here's an example of an XML file with the
structure I need to modify on install.
<?xml version="1.0"?>
<RootElement>
<SubElement>
<?js
//insert Javascript here with formatted property values
e.g.
[PropertyName]
?>
</SubElement>
</RootElement>
In my WiX code, I had:
<util:XmlConfig Id="EditXml" File="foo.xml" Action="create" Node="value"
On="install" ElementPath="//RootElement/SubElement" Sequence="1" >
<![CDATA[//the Javascript code]]>
</util:XmlConfig>
which, of course, placed the text next to the Javascript processing
instruction, rather than within it. So I looked into accessing XML
processing instruction tags with XPath, thinking that perhaps I wasn't using
the correct value for the util:XmlConfig/@ElementPath attribute. I've never
used XPath before, but I thought one of the following changes would work:
ElementPath="//RootElement/SubElement/processing-instruction('js')"
ElementPath="processing-instruction('js')//RootElement/SubElement"
ElementPath="//processing-instruction('js')"
ElementPath="processing-instruction('js')"
but to no avail. Am I just off with this syntax, or is there another
solution altogether?
Thanks in advance for the help!
--
View this message in context:
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Can-you-change-the-text-of-an-installed-file-based-on-installation-parameters-tp5378659p5389744.html
Sent from the wix-users mailing list archive at Nabble.com.
------------------------------------------------------------------------------
This SF.net email is sponsored by
Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users