我只想使用pythondom或元素树。我的xml文件如下。在
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<PostBuildEvent>
<Command>sign "Loc" </Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<PostBuildEvent>
<Command>COPY "SourceLoc" "DestLoc"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<PostBuildEvent>
<Command>COPY "SourceLoc" "DestLoc"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
</Project>
我想要的是清空包含副本的命令标记过程。和保持所有其他命令标记没有复制过程,如下面的xml所示
^{pr2}$
我只是扩展stackoverflow得到的解决方案; 我经常用它。。。 只需在'\uu main'函数中定义输入和输出xmlfile名称
使用elementtree,可以按照以下方法进行尝试:
相关问题 更多 >
编程相关推荐