The answer from @hyde is valid, but I have two extra notes that I will point out in the code below.
Of course it is up to you to re-organize the code to your needs
// Try with resource is used here to guarantee that the IO resources are properly closed
// Your code does not do that properly, the input part is not closed at all
// the output an in case of an exception, will not be closed as well
try (BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(inputXML), "UTF-8"));
PrintWriter out = new PrintWriter(new OutputStreamWriter(new FileOutputStream(outputXML), "UTF8"))) {
String line = reader.readLine();
while (line != null) {
out.println("");
out.println(line);
// It is highly recommended to use the line separator and other such
// properties according to your host, so using System.getProperty("line.separator")
// will guarantee that you are using the proper line separator for your host
out.println(System.getProperty("line.separator"));
line = reader.readLine();
}
} catch (IOException e) {
e.printStackTrace();
}