You should probably specify a *source* to read from, and then write to a
different destination. I suspect your path needs to be /catalog i.e. beginning
with a /
--
Brian Agnew http://www.oopsconsultancy.com
OOPS Consultancy Ltd
Tel: +44 (0)7720 397526
> On 8 Dec 2016, at 21:15, Munawar <a_m_ras...@hotmail.com> wrote:
>
> Hi,
>
> I'm using following Snipprt in Ant to do a simple thing like adding a node to
> book.xml.
>
> <?xml version="1.0"?>
> <catalog>
> <book>
> <author>Gambardella, Matthew</author>
> <title>XML Developer's Guide</title>
> <genre>Computer</genre>
> <publish_date>2000-10-01</publish_date>
> <description>An in-depth look at creating applications
> with XML.</description>
> </book>
> </catalog>
>
>
> My code is following.
>
> <project name="xxx" default="test"
> xmlns:oops="antlib:com.oopsconsultancy.xmltask">
> <target name="test" >
> <oops:xmltask
> dest="C:/Users/mrashid/Desktop/Ant_scripts/input/book.xml">
> <insert path="catalog/book">
> <![CDATA[
> <price>44.95</price>
> ]]>
> </insert>
> </oops:xmltask>
> </target>
> </project>
>
> What I get is that the entire body of the xml file is wiped out and I only
> have following line.
>
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
>
> ------------------------------------------------------------------------------
> Developer Access Program for Intel Xeon Phi Processors
> Access to Intel Xeon Phi processor-based developer platforms.
> With one year of Intel Parallel Studio XE.
> Training and support from Colfax.
> Order your platform
> today.http://sdm.link/xeonphi_______________________________________________
> <http://sdm.link/xeonphi_______________________________________________>
> Xmltask-users mailing list
> Xmltask-users@lists.sourceforge.net
> <mailto:Xmltask-users@lists.sourceforge.net>
> https://lists.sourceforge.net/lists/listinfo/xmltask-users
> <https://lists.sourceforge.net/lists/listinfo/xmltask-users>
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
_______________________________________________
Xmltask-users mailing list
Xmltask-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xmltask-users