Add startDocument and endDocument calls

Change-Id: Iebf9a13d01f2d1e167345c6339fe3b97fc2b4381