1 18 package org.apache.batik.dom; 19 20 import org.w3c.dom.CDATASection ; 21 import org.w3c.dom.Node ; 22 import org.w3c.dom.Text ; 23 24 30 public class GenericCDATASection extends AbstractText implements CDATASection { 31 34 protected boolean readonly; 35 36 39 protected GenericCDATASection() { 40 } 41 42 45 public GenericCDATASection(String value, AbstractDocument owner) { 46 ownerDocument = owner; 47 setNodeValue(value); 48 } 49 50 54 public String getNodeName() { 55 return "#cdata-section"; 56 } 57 58 62 public short getNodeType() { 63 return CDATA_SECTION_NODE; 64 } 65 66 69 public boolean isReadonly() { 70 return readonly; 71 } 72 73 76 public void setReadonly(boolean v) { 77 readonly = v; 78 } 79 80 83 protected Text createTextNode(String text) { 84 return getOwnerDocument().createCDATASection(text); 85 } 86 87 90 protected Node newNode() { 91 return new GenericCDATASection(); 92 } 93 } 94 | Popular Tags |