import xml.dom.minidom


def newRss(title, link, description):
        """Returns an XML Document containing an RSS 2.0 feed with no items."""
        rss = xml.dom.minidom.Document()

        root = rss.appendChild(rss.createElement("rss"))
        root.setAttribute("version", "2.0")
        root.setAttribute("xmlns:atom","http://www.w3.org/2005/Atom")

        channel = root.appendChild(rss.createElement("channel"))
        addEl = lambda tag,value: channel.appendChild(rss.createElement(tag)).appendChild(rss.createTextNode(value))
        def addElA(tag,attr):
                node=rss.createElement(tag)
                for attr, val in attr.items():
                        node.setAttribute(attr, val)
                channel.appendChild(node)

        addEl("title", title)
        addElA('atom:link', attr={"rel": "self",
                   "type": "application/rss+xml", "href":  link + "@@file/rss.xml"})
        addEl("link", link)
        addEl("description", description)

        return rss