It seems like the answer to every question about reading XML value using Wix is to write a custom action. I have found a couple of solutions that I have tried with no success. Does someone have a working XML Search custom action that you pass a XML filename and a XPath value and it will populate a Property value with its results. I don't need to add an extension with lots of other actions or an action that a lot more than what I need. Although if you're using something that works I'd take it.
I need it to be able to evaluate complex XPath expressions with valid XST functions like substring-before() so I can parse Values. Has someone got something that works for them that they don't mind sharing so I don't have to write my own? (which is not my strong point) This solution is what I am looking for but I can't get it to work for me. http://www.codeproject.com/Articles/865604/Writing-a-Wix-Extension-to-Read-XML-Files When I try to build the project I get several errors. Error 1 The command "copy ".\Wix.XmlSearch_src\XmlSearch.WixLib\bin\Debug\XmlSearch.wixlib" ".\Wix.XmlSearch_src\Resources" /y" exited with code 1. Wix.XmlSearch If I add this to the Wix.Test.Setup Product.wxs <xmlsearch:XmlSearch Id="Test1" File="$(var.ProjectDir)Test.xml" XPath="/Testdata/testnode/@Value"/> I get this error Error 1 The Property element contains an unhandled extension element 'xmlsearch:XmlSearch'. Please ensure that the extension for elements in the 'http://schemas.rottedfrog.co.uk/wix/XmlSearch' namespace has been provided. If I try to add the binary to a project I get this error A reference to C:\Program Files (x86)\WiX Toolset v3.9\bin\\Wix.WmlSearch.dll could not be added. Please make sure tha tthe file is accessible, and that it is a valid Wix reference. I have tried this one which works pretty well https://bitbucket.org/nirbar1/panelswwixextension But there is a bug in the XPath expression evaluation that won't allow functions like substring-before() etc to be used. ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users