code: public static void writeXML(DocumentFragment fragment, Writer writer) throws IOException {
  		assert fragment != null : AssertMessages.notNullParameter(0);
  		assert writer != null : AssertMessages.notNullParameter(1);
  		writeNode(fragment, writer);
  	}
docs: Write the given node tree into a XML file.
  
  @param fragment is the object that contains the node tree
  @param writer is the target stream
  @throws IOException if the stream cannot be read.