Clean chunk Java code for SAX style XML generation