ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <ste...@apache.org>
Subject Re: Change XML by Ant
Date Tue, 14 Feb 2006 07:40:00 GMT
Giovanni Mesturini wrote:
> Hi community,
> 
> is there a way to change an XML file using Ant's
> script? I found the XMLProperty tasks that reads an
> XML, but it seems to be read-only.

Ant1.7 will have <echoxml> for simple XML output. For complex stuff 
(xmlnamespaces, new headers, different encodings), <echo>  is still the 
tool of choice


     <echo file="${target.pom}"><![CDATA[<project>
   <modelVersion>4.0.0</modelVersion>
   <groupId>${m2.groupID}</groupId>
   <artifactId>${artifact.name}</artifactId>
   <packaging>jar</packaging>
   <version>${Version}</version>
</project>
   ]]></echo>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message