![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Merge/Synchronize XML Files >Thread Next - Re: Merge/Synchronize XML Files Re: Merge/Synchronize XML FilesTo: NULL Date: 11/3/2006 1:07:00 PM "Meelis Lilbok" <meelis.lilbok@d...> wrote in message news:uvG8V2z$GHA.2328@T...... > Hi is for synchronizing two xml files any fast solution? > > Lets say i have 2 xml files 1.xml and 2.xml > > 1.xml contianes > > <test> > <t id="1">Hello</t> > <t id="2">World</t> > <t id="3">Good bye!</td> > </test> > > 2.xml containes > <test> > <t id="1">Hello</t> > <t id="2">World</t> > </test> > > After synchronizing 2.xml must look likt this > <test> > <t id="1">Hello</t> > <t id="2">World</t> > <t id="3">Good bye!</td> > </test> > > At the moment i use > For Each > Next > and this is too slow, if file containes about 1000 <t> nodes > > Regards; > Meelis > I suspect that a loop using .nextNode on either the input, target or both per iteration will suit your needs Although XSL may still outperform a script based language doing this even 1000 nodes shouldn't take an excessive amount of time. Your example doesn't show why you simply don't replace 2.xml with 1.xml. More detail show the wider set of cases are needed to arrive at an apporpriate solution. If id="1" were missing from 1.XML should it be deleted from 2.xml? If id="2" in 2.xml contained the word 'kosmos' should it contain 'world' after the merge because it was replaced by id="2" from 1.xml? In the real world is t a complex element if so do you intend to merge the contents of ts of the same id from each xml file or simply replace the t in 2.xml with the one in 1.xml? | ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
