Ramesh P - 2014-06-11

correct you will not find root node. after parsing root pointer might be moved from its original location so before performing any operation with root pointer save root pointer location to tmp variable and then after operation store it back.

this trick solved my problem.