01: // Copyright (c) 2004 Per M.A. Bothner.
02: // This is free software; for terms and warranty disclaimer see ./COPYING.
03:
04: package gnu.kawa.xml;
05:
06: import gnu.xml.*;
07:
08: /* #ifdef use:org.w3c.dom.Node */
09: // import org.w3c.dom.*;
10: /* #endif */
11:
12: public class KComment extends KCharacterData
13: /* #ifdef use:org.w3c.dom.Node */
14: // implements org.w3c.dom.Comment
15: /* #endif */
16: {
17: public KComment(NodeTree seq, int ipos) {
18: super (seq, ipos);
19: }
20:
21: /* #ifdef use:org.w3c.dom.Node */
22: // public short getNodeType () { return Node.COMMENT_NODE; }
23: /* #endif */
24:
25: public String getNodeName() {
26: return "#comment";
27: }
28:
29: public static KComment valueOf(String text) {
30: NodeTree tree = new NodeTree();
31: tree.writeComment(text, 0, text.length());
32: return new KComment(tree, 0);
33: }
34: }
|