domDiffsSample.js
/**
 * Process two given XML files, determine delta and identify the actions that need to be taken on the delta.
 * If currentXMLFile is null, then only the newXMLFile is processed. This will result in identifying all the nodes as new
 * Reads the file contents then call xmlStringActions to process the actual XML
 * @return see xmlStringActions
 */
Process two given XML files, determine delta and identify the actions that need to be taken on the delta.
If currentXMLFile is null, then only the newXMLFile is processed. This will result in identifying all the nodes as new
Reads the file contents then call xmlStringActions to process the actual XML
@return see xmlStringActions
Process two given XML files determine delta and identify the actions that need to be taken on the delta . If currentXMLFile is null then only the newXMLFile is processed . This will result in identifying all the nodes as new Reads the file contents then call xmlStringActions to process the actual XML @return see xmlStringActions
function xmlFileActions(currentXMLFile, newXMLFile)
{
	let currentXMLFileText = "";
	if(!underscore.isEmpty(currentXMLFile))
	{
		currentXMLFileText = fs.readFileSync(currentXMLFile, "utf8");
	}
	let newXMLFileText = fs.readFileSync(newXMLFile, "utf8");
	return xmlStringActions(currentXMLFileText, newXMLFileText);
}
function xmlFileActions ( currentXMLFile , newXMLFile ) { let currentXMLFileText = "" ; if ( ! underscore . isEmpty ( currentXMLFile ) ) { currentXMLFileText = fs . readFileSync ( currentXMLFile , "utf8" ) ; } let newXMLFileText = fs . readFileSync ( newXMLFile , "utf8" ) ; return xmlStringActions ( currentXMLFileText , newXMLFileText ) ; }
Process two given XML files, determine delta and identify the actions that need to be taken on the delta.
Process two given XML files determine delta and identify the actions that need to be taken on the delta .