1 package com.icl.saxon.tree; 2 import com.icl.saxon.output.Outputter; 3 import com.icl.saxon.om.NodeInfo; 4 import javax.xml.transform.TransformerException ; 5 6 import org.w3c.dom.Comment ; 7 import org.w3c.dom.DOMException ; 8 9 13 14 15 final class CommentImpl extends NodeImpl implements Comment { 16 17 String comment; 18 19 public CommentImpl(String content) { 20 this.comment = content; 21 } 22 23 27 28 public final String getNodeName() { 29 return "#comment"; 30 } 31 32 public final String getStringValue() { 33 return comment; 34 } 35 36 public final short getNodeType() { 37 return NodeInfo.COMMENT; 38 } 39 40 43 44 public void copy(Outputter out) throws TransformerException { 45 out.writeComment(comment); 46 } 47 48 } 49 50 51 | Popular Tags |