def setPayload(self,payload,add=0):
        """ Sets node payload according to the list specified. WARNING: completely replaces all node's
            previous content. If you wish just to add child or CDATA - use addData or addChild methods. """
        if isinstance(payload, basestring): payload=[payload]
        if add: self.kids+=payload
        else: self.kids=payload
 Sets node payload according to the list specified. WARNING: completely replaces all node's
            previous content. If you wish just to add child or CDATA - use addData or addChild methods. 
chrome-cordova/gcmServer/xmpp/simplexml.py