JDocument::parse

Parses the document and prepares the buffers