1 7 8 package org.dom4j.tree; 9 10 import java.io.IOException ; 11 import java.io.Writer ; 12 13 import org.dom4j.Visitor; 14 15 24 public abstract class AbstractText extends AbstractCharacterData implements 25 org.dom4j.Text { 26 public AbstractText() { 27 } 28 29 public short getNodeType() { 30 return TEXT_NODE; 31 } 32 33 public String toString() { 34 return super.toString() + " [Text: \"" + getText() + "\"]"; 35 } 36 37 public String asXML() { 38 return getText(); 39 } 40 41 public void write(Writer writer) throws IOException { 42 writer.write(getText()); 43 } 44 45 public void accept(Visitor visitor) { 46 visitor.visit(this); 47 } 48 } 49 50 86 | Popular Tags |