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