Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can you use Ant to Build/Modify XML files?

Tags:

java

xml

ant

I am quite new to ant and have been looking at the tasks. I am trying to generate an xml file. Do I need to call an external process or does ant have some way to do this? It could be as simple as sending a string to a txt file and saving it as a .xml. Is it possible?

like image 474
sarcasteak Avatar asked Jun 17 '10 18:06

sarcasteak


People also ask

How can I modify XML file?

From the Project menu, select Add New Item. Select XML File from the Templates pane. Enter the filename in the Name field and press Add. The XML file is added to the project and opens in the XML editor.

How do I build an Ant build xml?

Create Ant build file In the Project tool window, select the directory, where the build file should be created. Right-click the directory and from the context menu, select New | File ( Alt+Insert ). In the New File dialog, specify the name of the new file with the xml extension, for example, build. xml.

How do I run an Ant file in xml?

To run the ant build file, open up command prompt and navigate to the folder, where the build. xml resides, and then type ant info. You could also type ant instead. Both will work,because info is the default target in the build file.


1 Answers

When you have to deal with any kind of XML processing within in your ant workflow, the xmltask is strongly recommended. Very detailed documentation and good support. All you need beside that is some XPATH knowledge. Here => another helpful article

like image 151
Rebse Avatar answered Sep 20 '22 03:09

Rebse