Returns a String containing the actual XML form of the comment; for example, <--This is a comment-->.
String
<--This is a comment-->
9596979899100101102103104105
public void testToXML() { Comment c1 = new Comment("content"); assertEquals("<!--content-->", c1.toXML()); c1.setValue(" 012345678901234567890123456789012345678901234567890123456789 "); assertEquals( "<!-- 012345678901234567890123456789012345678901234567890123456789 -->", c1.toXML()
100101102103104105106107108109110
assertEquals("<!--content-->", c1.toXML()); c1.setValue(" 012345678901234567890123456789012345678901234567890123456789 "); assertEquals( "<!-- 012345678901234567890123456789012345678901234567890123456789 -->", c1.toXML() ); }
279280281282283284285286287288289
} public void testAllowReservedCharactersInData() { Comment comment = new Comment("<test>&&greater;"); String xml = comment.toXML(); assertEquals("<!--<test>&&greater;-->", xml); } public void testForbidIllegalCharactersInComments() {