2014-01-31 Jeremy <s6a9d6...@gmail.com>:
> For the record and anyone curious, It seems to be XmlFile not liking
> something about the xmlns in the nlog tag, somehow that's preventing it
> from parsing the other elements.
>
> i.e. with a plain <nlog> in the app.config, those Util:XmlFile's work
> great. But these in app.config, XmlFile errors:
>
> <nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"; xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance";>
>
> <nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd";>

If you have <foo><bar xmlns="http://example.com/";><quux/></bar></foo>,
the XPath expression "/foo/bar/quux" won't match, because it's asking
for namespace-less elements, and both bar and quux are in a namespace.

It seems WiX doesn't support declaring namespace prefixes to be used
in the XPath expression, so you'd have to use the ugly
"/foo/*[local-name() = 'bar']/*[local-name() = 'quux']". Or, if you
want to make sure it only applies to an element in the right
namespace, *[local-name() = 'foo' and namespace-uri() =
'http://example.com/']

-- 
Nicolás

------------------------------------------------------------------------------
WatchGuard Dimension instantly turns raw network data into actionable 
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to