Returns a DOM representation of the line treatment.
        @return: Element

def to_xml(self, name):
        '''
        Returns a DOM representation of the line treatment.
        @return: Element
        '''
        for n, v in {"rate_type": self.rate_type,
                     "rate": self.rate,
                     "name": self.name,
                     "description": self.description}.items():
            if is_empty_or_none(v):
                raise TreatmentError("'%s' attribute cannot be empty " \
                                         "or None." % n)

        doc = Document()
        root = doc.createElement(name)
        root.setAttribute("type", self.rate_type)
        root.setAttribute("name", to_unicode(self.name))
        root.setAttribute("description", to_unicode(self.description))
        if self.interval:
            root.setAttribute("base", self.interval)
        root.appendChild(doc.createTextNode(to_unicode(self.rate)))
        return root