TextNode.java

 1package eu.siacs.conversations.xml;
 2
 3import eu.siacs.conversations.utils.XmlHelper;
 4
 5public class TextNode implements Node {
 6	protected String content;
 7
 8	public TextNode(final String content) {
 9		if (content == null) throw new IllegalArgumentException("null TextNode is not allowed");
10		this.content = content;
11	}
12
13	public String getContent() {
14		return content;
15	}
16
17	public String toString() {
18		return XmlHelper.encodeEntities(content);
19	}
20}