我想知道一种使用Python在XML中注释和取消注释元素的方法。在
<target depends="create-build-dir" name="build-Folio">
<property name="project.name" value="Folio"/>
<ant antfile="build.xml" dir="Folio/FolioUI" inheritall="false" target="package"/>
<ant antfile="build.xml" dir="Folio/Folio" inheritall="false" target="package"/>
</target>
我怎样才能让它看起来像这样:
^{pr2}$然后根据需要再次删除评论。。。 或者
我正在使用minidomxml.dom文件. 我需要使用不同的XML解析器吗?希望避免使用正则表达式。。。那将是一场噩梦。在
{and uncommenting下面的函数}包括对以下节点的注释:
输出:
^{pr2}$使用ElementTree:
相关问题 更多 >
编程相关推荐