1 38 39 package com.sun.xml.fastinfoset.stax.events ; 40 41 42 import javax.xml.stream.events.Comment; 43 import javax.xml.stream.XMLStreamConstants; 44 45 public class CommentEvent extends EventBase implements Comment { 46 47 48 private String _text; 49 50 public CommentEvent() { 51 super(COMMENT); 52 } 53 54 public CommentEvent(String text) { 55 this(); 56 _text = text; 57 } 58 59 60 63 public String toString() { 64 return "<!--" + _text + "-->"; 65 } 66 67 71 public String getText() { 72 return _text ; 73 } 74 75 public void setText(String text) { 76 _text = text; 77 } 78 } 79 | Popular Tags |