output the original document, node by node