删除WiX中的所有XML子项
Wix中是否有方法删除特定XML元素的所有子元素 我尝试了以下方法:删除WiX中的所有XML子项,xml,xpath,wix,Xml,Xpath,Wix,Wix中是否有方法删除特定XML元素的所有子元素 我尝试了以下方法: <util:XmlConfig Id="Perf_delete" File="[INSTALLFOLDER]unity.config" ElementPath='/configuration/unity/container/register[\[]@name="Perf"[\]]/constructor/param[\[]@name="machineNames"[\]]/array' Verify
<util:XmlConfig Id="Perf_delete"
File="[INSTALLFOLDER]unity.config"
ElementPath='/configuration/unity/container/register[\[]@name="Perf"[\]]/constructor/param[\[]@name="machineNames"[\]]/array'
VerifyPath="*"
Action="delete"
Node="element"
On="install"/>
我在这里具体说明:
- ElementPath—指向元素本身
- VerifyPath-*指定所有子元素
显然,有一种解决方法可以删除元素本身,然后重新创建它,但是对于所有属性和名称空间来说,这非常繁琐。您可以删除父元素,然后再创建它,而无需添加新的嵌套子元素。只有一个util:XmlConfig声明,无法从父元素中删除多个子元素