Reputation: 614
Is there any method in Ant that you can add text after any spesific text in text file? For example, I want to add an xml line after a <service>
xml tag.
Upvotes: 0
Views: 843
Reputation: 10377
For all xmlspecific tasks the use of xmltask is recommended. For simple appending of some xml use the echoxml task (since Ant 1.7) with attribute append="true"
Upvotes: 1
Reputation: 16235
To modify an XML document, the best method is probably to do an XSL transformation using the Ant XSLT task. The stylesheet for the task you describe sounds like it would be simple, and this Ant task makes it very straightforward to execute.
Upvotes: 3
Reputation: 101
You can write simple class for append text.
Then you can run it using ant's task 'java'
ant java task
Upvotes: 2