Document parse method.