code: 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);
  		}
  	}
docs: Write out the non-default properties in this configuration to the
  given {@link Writer}.
  
  <li>
  When property name is not empty and the property exists in the
  configuration, this method writes the property and its attributes
  to the {@link Writer}.
  </li>
  <p>
  
  <li>
  When property name is null or empty, this method writes all the
  configuration properties and their attributes to the {@link Writer}.
  </li>
  <p>
  
  <li>
  When property name is not empty but the property doesn't exist in
  the configuration, this method throws an {@link IllegalArgumentException}.
  </li>
  <p>
  @param out the writer to write to.