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
<xmltask source="shared.xml" dest="shared.xml" outputter="simple:3"> <insert path="/sharedobjects[last()]"> <![CDATA[ <connection> <name>MY CONNECTION</name> </connection> ]]> </insert> </xmltask>
If I run this multiple times, of course I will have multiple MY CONNECTION in the xml file. I would like to make a check so that I insert only if the desired connection is not already in the file.
Thanks in advance.