1 21 24 package org.lobobrowser.html.domimpl; 25 26 import org.w3c.dom.Comment ; 27 import org.w3c.dom.DOMException ; 28 import org.w3c.dom.Node ; 29 30 public class CommentImpl extends CharacterDataImpl implements Comment { 31 public CommentImpl(String text) { 32 super(text); 33 } 34 35 public String getLocalName() { 36 return null; 37 } 38 39 public String getNodeName() { 40 return "#comment"; 41 } 42 43 public String getNodeValue() throws DOMException { 44 return this.getTextContent(); 45 } 46 47 public void setNodeValue(String nodeValue) throws DOMException { 48 this.setTextContent(nodeValue); 49 } 50 51 public short getNodeType() { 52 return Node.COMMENT_NODE; 53 } 54 55 protected Node createSimilarNode() { 56 return new CommentImpl(this.text); 57 } 58 } 59 | Popular Tags |