Format functions
TODO: Format given document to json format
TODO: Format given document to xml format
TODO: Format given document to json format.
TODO: Format given document to xml format.