public static void writeXML(DocumentFragment fragment, File file) throws ParserConfigurationException, IOException {
		assert fragment != null : AssertMessages.notNullParameter(0);
		assert file != null : AssertMessages.notNullParameter(1);
		try (FileOutputStream fos = new FileOutputStream(file)) {
			writeNode(fragment, fos);
		}
	}
public static void writeXML ( DocumentFragment fragment , File file ) throws ParserConfigurationException , IOException { assert fragment != null : AssertMessages . notNullParameter ( 0 ) ; assert file != null : AssertMessages . notNullParameter ( 1 ) ; try ( FileOutputStream fos = new FileOutputStream ( file ) ) { writeNode ( fragment , fos ) ; } }
Write the given node tree into a XML file.

@param fragment is the object that contains the node tree
@param file is the file name.
@throws IOException if the stream cannot be read.
@throws ParserConfigurationException if the parser cannot  be configured.