Voting

: five plus zero?
(Example: nine)

The Note You're Voting On

jeewiya at gmail dot com
7 years ago
XMLDiff\DOM can be use like this, for compare xml files changes.

<?php


function getChangeElements($currentContent, $oldContent) {
try {
$currentDoc = new DOMDocument();
$currentDoc->loadXML($currentContent);

$oldDoc = new DOMDocument();
$oldDoc->loadXML($oldContent);
$xmldiff = new XMLDiff\DOM();
return
$xmldiff->diff($oldDoc, $currentDoc);
} catch (
Exception $ex) {
throw
$ex;
}
}

getChangeElements('updated.xml', 'old.xml');

?>

<< Back to user notes page

To Top