使用Ant更改xml文件
如何使用Ant更改现有xml文件。 例如:使用Ant更改xml文件,xml,ant,Xml,Ant,如何使用Ant更改现有xml文件。 例如: <test attr="0"> ... </test> ... 到 ... 使用(具体请参见部分),例如: 更改一个属性是一个非常困难的决定。那么,您必须使用Replace()或ReplaceRegExp。 <test attr="1"> ... </test> <attr path="//test[@attr='0']/" attr="attr" value="
<test attr="0">
...
</test>
...
到
...
使用(具体请参见
部分),例如:
更改一个属性是一个非常困难的决定。那么,您必须使用Replace
()或ReplaceRegExp
。
<test attr="1">
...
</test>
<attr path="//test[@attr='0']/" attr="attr" value="1"/>