Re: XML Data merging

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Naz Gassiep wrote:

Eric Butera wrote:
On 1/12/08, Naz Gassiep <naz@xxxxxxxx> wrote:
I'm using simplexml to fetch data from a set of data files. If I have
two files, and one is an update to the other, is there an easy way to
merge the two files together, rather than having write logic that checks
one and then the other?

Both files conform to the same DTD and thus the data in the update will
perfectly eclipse the data in the main file. If I can do this it would
save me writing a whole bunch of logic.

Thanks,
- Naz

diff!

Could I trouble you to elaborate? Or at least point to the RTFM url.
- Naz.


once you have the data from simplexml, use http://us3.php.net/array_diff to get the differences between the two data sets.


--
Jim Lucas

   "Some men are born to greatness, some achieve greatness,
       and some have greatness thrust upon them."

Twelfth Night, Act II, Scene V
    by William Shakespeare

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux