code: public static void saveEmitter(OutputStream out, ConfigurableEmitter emitter)
  			throws IOException {
  		try {
  			DocumentBuilder builder = DocumentBuilderFactory.newInstance()
  					.newDocumentBuilder();
  			Document document = builder.newDocument();
  
  			document.appendChild(emitterToElement(document, emitter));
  			Result result = new StreamResult(new OutputStreamWriter(out,
  					"utf-8"));
  			DOMSource source = new DOMSource(document);
  
  			TransformerFactory factory = TransformerFactory.newInstance();
  			Transformer xformer = factory.newTransformer();
  			xformer.setOutputProperty(OutputKeys.INDENT, "yes");
  
  			xformer.transform(source, result);
  		} catch (Exception e) {
  			Log.error(e);
  			throw new IOException("Failed to save emitter");
  		}
  	}
docs: Save a single emitter to the XML file
  
  @param out
  The location to which we should save
  @param emitter
  The emitter to store to the XML file
  @throws IOException
  Indicates a failure to write or encode the XML