Document parse method