code: private void exportTBXDocument(Document tbxDocument, Writer writer) throws TransformerException {
          // Prepare the transformer to persist the file
  		TransformerFactory transformerFactory = TransformerFactory
  				.newInstance();
  		Transformer transformer = transformerFactory.newTransformer();
  		transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
  		transformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM,
  				"http://ttc-project.googlecode.com/files/tbxcore.dtd");
  		transformer.setOutputProperty(OutputKeys.STANDALONE, "yes");
  		transformer.setOutputProperty(OutputKeys.INDENT, "yes");
  		try {
  			transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2");
  		} catch (IllegalArgumentException e) {
  			throw new TransformerException(e);
  		} // Ignore
  
          // Actually persist the file
  		DOMSource source = new DOMSource(tbxDocument);
  		StreamResult result = new StreamResult(writer);
  		transformer.transform(source, result);
  	}
docs: Export the TBX document to a file specified in parameter.
  
  @throws TransformerException