temp = doc.createElement("link");
// make sure link uses a safe URL scheme
temp.setTextContent(SaferHTMLHandler.sanitizeURL(feed.getLink()));
newsNode.appendChild(temp);
SyndImage image = feed.getImage();
if (image != null){
Node imageNode = doc.createElement("image");
newsNode.appendChild(imageNode);
temp = doc.createElement("url");
// make sure link uses a safe URL scheme
temp.setTextContent(SaferHTMLHandler.sanitizeURL(image.getUrl()));
imageNode.appendChild(temp);
temp = doc.createElement("title");
temp.setTextContent(image.getTitle());
imageNode.appendChild(temp);
temp = doc.createElement("description");
temp.setTextContent(image.getDescription());
imageNode.appendChild(temp);
temp = doc.createElement("link");
// make sure link uses a safe URL scheme
temp.setTextContent(SaferHTMLHandler.sanitizeURL(image.getLink()));
imageNode.appendChild(temp);
}
Node itemsNode = doc.createElement("items");
newsNode.appendChild(itemsNode);