Allow filtering the Delta output...

SVN:trunk[2794]
This commit is contained in:
Denis Flaven
2013-07-08 08:48:03 +00:00
parent 3066240ca0
commit a9ad236439

View File

@@ -1220,13 +1220,21 @@ EOF
/**
* Get the text/XML version of the delta
*/
public function GetDelta()
public function GetDelta($aNodesToIgnore = array())
{
$oDelta = new MFDocument();
foreach($this->ListChanges() as $oAlteredNode)
{
$this->ImportNodeAndPathDelta($oDelta, $oAlteredNode);
}
foreach($aNodesToIgnore as $sXPath)
{
$oNodesToRemove = $oDelta->GetNodes($sXPath);
foreach($oNodesToRemove as $oNode)
{
$oNode->parentNode->removeChild($oNode);
}
}
return $oDelta->saveXML();
}