docs: public void writeXml(String propertyName, Writer out)
  			throws IOException, IllegalArgumentException {
  		Document doc = asXmlDocument(propertyName);
  
  		try {
  			DOMSource source = new DOMSource(doc);
  			StreamResult result = new StreamResult(out);
  			TransformerFactory transFactory = TransformerFactory.newInstance();
  			Transformer transformer = transFactory.newTransformer();
  
  			// Important to not hold Configuration log while writing result, since
  			// 'out' may be an HDFS stream which needs to lock this configuration
  			// from another thread.
  			transformer.transform(source, result);
  		} catch (TransformerException te) {
  			throw new IOException(te);
  		}
  	}