208209210211212213214215216217218
commentStripper.open(); rawDoc.copy(commentStripper, CopyOptions.ALL_NAMESPACES); commentStripper.close(); DocumentImpl doc = (DocumentImpl)styleBuilder.getCurrentRoot(); styleBuilder.reset(); return doc; }