Raditha Dissanayake wrote:
Gal wrote:
Hello all,
Does anyone here add some good experience of writing PHP script which is merging 2 XML files.
Looks like this should go into an algorithms mailing list :-) in the mean time you might want to start looking at sax parser functions, and associated arrays in the php manual.
I will check the SAX functions.
I know PHP very well. But I think that there is a lake of utilities and libs used in version 4.
At least PHP 5 has the simple_xml module & better DOM XML support.
file 1: ========= <XML> <NODE name="aaa" value="old_value" /> <NODE name="bbb" value="hello all" /> </XML>
file 2: ========= <XML> <NODE name="aaa" value="NEW_value" /> <NODE name="ccc" value="PHP_is_good" /> </XML>
expected merge result: ======================= <XML> <NODE name="aaa" value="NEW_value" /> <NODE name="bbb" value="hello all" /> <NODE name="ccc" value="PHP_is_good" /> </XML>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php