1 package org.xmldb.xupdate.lexus.commands; 2 3 55 56 import org.w3c.dom.Node ; 57 58 63 public class InsertCDATA extends InsertStates { 64 65 68 public InsertCDATA() { 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 cdata = contextNode.getOwnerDocument().createCDATASection(data); 82 return contextNode.appendChild(cdata); 83 } 84 } 85 86 | Popular Tags |