String description = textInput.getDescription();
String name = textInput.getName();
String link = textInput.getLink();
if (title == null) {
throw new FeedException("invalid RSS TextInput - missing required title element");
}
if (description == null) {
throw new FeedException("invalid RSS TextInput - missing required description element");
}
if (name == null) {
throw new FeedException("invalid RSS TextInput - missing required name element");
}
if (link == null) {
throw new FeedException("invalid RSS TextInput - missing required link element");
}
Element textInputElement = new Element("textInput", RSS_NS);
textInputElement.addContent(generateSimpleElement("title", title, RSS_NS));
textInputElement.addContent(generateDescriptionElement(textInput.getDescription(), RSS_NS));