我正在尝试转换包含xmlns
属性的另一个元素的子元素,但似乎我的转换被忽略,直到我删除xmlns
.
所以假设我有:
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
internalLogLevel="Trace"
internalLogFile="NLogInternal.log"
autoReload="true">
<targets>
</targets>
</nlog>
我试图摆脱targets
元素:
<nlog>
<targets xdt:Transform="Remove" />
</nlog>
但这似乎不起作用,但是如果我删除xmlns
并且xmlns:xsi
属性转换按预期工作。
我做错了什么?