'Creates an XML representation of the AlfredItem
:return:'

def toXML(self):

    item = '<item    uid="{uid}"    arg="{arg}"    valid="{valid}"'
    if (self.autocomplete != None):
        item += '    autocomplete="{autocomplete}"'
    item += '>'
    item += '<title><![CDATA[{title}]]></title>'
    item += '<subtitle><![CDATA[{subtitle}]]></subtitle>'
    if (self.icon != None):
        if (self.icontype != None):
            item += '<icon    type="{icontype}">{icon}</icon>'
        else:
            item += '<icon>{icon}</icon>'
    item += '</item>'
    return item.format(uid=self.uid, arg=self.arg, valid=('yes' if self.valid else 'no'), icontype=self.icontype, title=self.title, subtitle=self.subtitle, icon=self.icon, autocomplete=self.autocomplete)
