Not easily. You've have to (perhaps) delete the nodes from the file first
that match certain criteria, and then insert from the second file. There's
no specific merge capability.

Brian

> As part of our build process I need to merge two XML files, with matching
> nodes from the second file replacing similar nodes from the first file, or
> just appended if there is no match from the first file. Can XML Task do
> this?
>
> Example:
>
> File 1:
> <file>
>   <node name="node1" attr="x"/>
>   <node name="node2" attr="y"/>
> </file>
>
> File 2:
> <file>
>   <node name="node1" attr="z"/>
>   <node name="node3" attr="a"/>
> </file>
>
> Desired result:
> <file>
>   <node name="node1" attr="z"/>
>   <node name="node2" attr="y"/>
>   <node name="node3" attr="a"/>
> </file>
>
> Thanks.
>
> --
> Bobman
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev_______________________________________________
> Xmltask-users mailing list
> Xmltask-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/xmltask-users
>


-- 
Brian Agnew                  http://www.oopsconsultancy.com
OOPS Consultancy Ltd
Tel: +44 (0)7720 397526
Fax: +44 (0)20 8682 0012



------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Xmltask-users mailing list
Xmltask-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xmltask-users

Reply via email to