public void setDocument(Document doc, long start) {
		try {
			if(doc != null) {
				this.textArea.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_XML);
				
				String contents = stringify(doc);
				this.textArea.setText(contents);
				setStats(start);
			}
		} catch(Exception e) {
			setContents(e.getMessage() + "\n" + Utilities.getStackTrace(e), start);
		}
	}