1 package org.xmldb.xupdate.lexus.commands; 2 3 55 56 import org.w3c.dom.Node ; 57 58 63 public class InsertComment extends InsertStates { 64 65 68 public InsertComment() { 69 super(); 70 } 71 72 73 76 public Node execute(Node contextNode) { 77 String data = ""; 78 if (!characters.isEmpty()) { 79 data = (String ) characters.firstElement(); 80 } 81 Node comment = contextNode.getOwnerDocument().createComment(data); 82 return contextNode.appendChild(comment); 83 } 84 } 85 86 | Popular Tags |