complete evaluate() function

evaluate() function is used for evaluate XML file.