public String getText() {
		if (content.size() == 0) {
			return "";
		}

		// If we hold only a Text or CDATA, return it directly
		if (content.size() == 1) {
			final Object obj = content.get(0);
			if (obj instanceof Text) {
				return ((Text) obj).getText();
			}
			return "";
		}

		// Else build String up
		final StringBuilder textContent = new StringBuilder();
		boolean hasText = false;

		for (int i = 0; i < content.size(); i++) {
			final Object obj = content.get(i);
			if (obj instanceof Text) {
				textContent.append(((Text) obj).getText());
				hasText = true;
			}
		}

		if (!hasText) {
			return "";
		}
		return textContent.toString();
	}