/** * This creates the comment with the supplied text. * * @param text <code>String</code> content of comment. */ public Comment(String text) { super(CType.Comment); setText(text); }
private void normaliseLineEndings( Document document ) { for ( Iterator<?> i = document.getDescendants( new ContentFilter( ContentFilter.COMMENT ) ); i.hasNext(); ) { Comment c = (Comment) i.next(); c.setText( ReleaseUtil.normalizeLineEndings( c.getText(), ls ) ); } for ( Iterator<?> i = document.getDescendants( new ContentFilter( ContentFilter.CDATA ) ); i.hasNext(); ) { CDATA c = (CDATA) i.next(); c.setText( ReleaseUtil.normalizeLineEndings( c.getText(), ls ) ); } }