Returns the document as string form. Please note that if there is anything in piecesAfterRoot,
they are discarded. If you want to add them to the file, loop over that and append it yourself
(but remember xml isn't supposed to have anything after the root element).
Returns the document as string form. Please note that if there is anything in piecesAfterRoot, they are discarded. If you want to add them to the file, loop over that and append it yourself (but remember xml isn't supposed to have anything after the root element).