cleaned and checkstyled XMLWriter.java