492493494495496497498499500501502
try { TextEdit edit = unit.rewrite(document, null); edit.apply(document); } catch (Exception e) { throw new ParserException("Could not modify source: " + unit.toString(), e); } String documentString = document.get(); return documentString; }