Re: Merge 2 XML files using PHP 4

From: Date: Wed, 07 Apr 2004 16:04:58 +0000
Subject: Re: Merge 2 XML files using PHP 4
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-182667@lists.php.net to get a copy of this message
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.
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>
-- Raditha Dissanayake. --------------------------------------------- http://www.radinks.com/print/upload.php SFTP, FTP and HTTP File Upload solutions

« previous php.general (#182667) next »