Questions tagged [xmltask]

66 questions
6
votes
3 answers

Ant XMLTASK insert a node if it doesn't exist already

I have a task to insert an XML node into an existing XML file, only if the node doesn't exist already. I manage the insert just fine, however I can't find that missing if-not functionality
bioShark
  • 683
  • 8
  • 15
4
votes
2 answers

xmltasks not working

I have the following task and for some reason is not matching my file:
javydreamercsw
  • 5,363
  • 13
  • 61
  • 106
4
votes
1 answer

Ant xmltask creates an empty "xmlns" attribute value

I have an XML file as follows: I apply the XMLTask attr in the following way: I expect the XML file to…
user3556152
  • 105
  • 8
4
votes
2 answers

Ant xmltask adding a blank xmlns=""

Below is the complete ant target which I am running to insert the driver to my wildfly standalone.xml:
3
votes
2 answers

XMLPath from ant using XMLTasks can't match if XML file has elements in different name spaces

I'm trying to get some matching using XMLTasks to replace some values in a xml file but it keeps failing due to no match. Using other tools it says that my xpath is correct but I can't figure out what's wrong. Here the file I'm searching:
javydreamercsw
  • 5,363
  • 13
  • 61
  • 106
3
votes
2 answers

How to export from SQL Server to XML

What is the easiest way to export to XML from SQL Server [Table or view] to XML? This is what I have done till now Execute Sql Task SELECT * FROM Production.Product FOR XML AUTO, TYPE, ROOT('Data') ResultSet XML in left result set section I have…
Zerotoinfinity
  • 6,290
  • 32
  • 130
  • 206
2
votes
0 answers

How do I manage line-endings when reading XML file in SSIS 2005

I have a simple xml file. It defined an element in that file as... I…
BlackMael
  • 3,198
  • 5
  • 25
  • 42
2
votes
1 answer

xmltask (ANT) :: replace withtext not working for null value of xml element

I am trying to replace xml field value using xmltask ( ANT script ) . But it is not replacing the value if the xml element is empty. for example : abc.txt xyz
nikhil
  • 21
  • 2
2
votes
1 answer

Using Ant xmltask to add a Datasource to the standalone.xml of wildfly 8

I am exploring the ways automate the installation process of a software using Ant Tool. Most of which I have been able to accomplish except for one that is editing the wildfly standalone.xml file to add a datasource to it. I feel the issue here is…
2
votes
1 answer

How to replace value of an XML field using Ant?

In an Ant script, I need to replace the value of javax.persistence.jdbc.url property in the following persistence.xml file.
user2984213
  • 119
  • 10
2
votes
1 answer

ANT: split string into multiple parameters

I have just finished an ANT script (does the job perfectly). But there is a new requirement and script has to change. The goal is to have ANT deployment file called deploy-all.txt. The file will look…
ES Su
  • 64
  • 2
  • 10
2
votes
1 answer

Replacement for xmltask in Gradle

I am trying to migrate my projects from Eclipse + Ant to Android Studio + Gradle. All of them have special builds for different app stores with different tracking ids, ad ids and so on. On Eclipse I had a ant xmltask that set the values of this ids…
2
votes
1 answer

xmltask remove doesn't work

I have this application.xml
Frank Winkler
  • 409
  • 6
  • 16
2
votes
1 answer

Find out wheter node exists in xml-document

I've got a XML-document with this content: How can I find out using ANT's whether the node already…
Hedge
  • 16,142
  • 42
  • 141
  • 246
2
votes
1 answer

How do I escape '&' in a property for use with xmltask?

I've got a property string (loaded from a file) containing the ampersand character in my ANT build-script. How can I escape that string so I can write it to a xml-file using xmltask? EDIT: The following code works but I can't replace & with &…
Hedge
  • 16,142
  • 42
  • 141
  • 246
1
2 3 4 5