def __init__(self, name, type, uri, tags=None):
        Element.__init__(self, (None, 'feed'), attribs={'type': type})
        self._feedName = Element((None, 'name'))
        self._feedName.addContent(name)
        self.addChild(self._feedName)

        self._feedUri = Element((None, 'feedUri'))
        self._feedUri.addContent(uri)
        self.addChild(self._feedUri)

        self._tags = []
        if tags is not None:
            for t in tags:
                tag = Tag(t)
                self.addChild(tag)
                self._tags.append(tag)
    def __init__(self, name, type, uri, tags = None):
        Element.__init__(self, (None, 'feed'), attribs={'type':type})
        self._feedName = Element((None, 'name'))
        self._feedName.addContent(name)
        self.addChild(self._feedName)
       
        self._feedUri = Element((None, 'feedUri'))
        self._feedUri.addContent(uri)
        self.addChild(self._feedUri)

        self._tags = []
        if tags is not None:
            for t in tags:
                tag = Tag(t)
                self.addChild(tag)
                self._tags.append(tag)
 def __init__(self, deviceName, rootUri, feeds = None, tags = None):
     Element.__init__(self, (None, 'device'))
     self._deviceName = Element((None, 'name'))
     self._deviceName.addContent(deviceName)
     self.addChild(self._deviceName)
     
     self._rootUri = Element((None, 'rootUri'))
     self._rootUri.addContent(rootUri)
     self.addChild(self._rootUri)
     
     self._feeds = []
     if feeds is not None:
         for f in feeds:
             self._feeds.append(f)
             self.addChild(f)
     
     self._tags = []
     if tags is not None:
         for t in tags:
             tag = Tag(t)
             self.addChild(tag)
             self._tags.append(tag)
    def __init__(self, deviceName, rootUri, feeds=None, tags=None):
        Element.__init__(self, (None, 'device'))
        self._deviceName = Element((None, 'name'))
        self._deviceName.addContent(deviceName)
        self.addChild(self._deviceName)

        self._rootUri = Element((None, 'rootUri'))
        self._rootUri.addContent(rootUri)
        self.addChild(self._rootUri)

        self._feeds = []
        if feeds is not None:
            for f in feeds:
                self._feeds.append(f)
                self.addChild(f)

        self._tags = []
        if tags is not None:
            for t in tags:
                tag = Tag(t)
                self.addChild(tag)
                self._tags.append(tag)
 def __init__(self, value):
     Element.__init__(self, (None, 'tag'))
     self.addContent(value)
 def __init__(self, value):
     Element.__init__(self, (None, 'tag'))
     self.addContent(value)
示例#7
0
文件: xmpp.py 项目: bmuller/campfirer
 def __init__(self, error, type="auth"):
     Element.__init__(self, (None, 'error'), attribs = {'type': type})
     self.addElement(error, Error.TYPES[error])
示例#8
0
 def __init__(self, error, type="auth"):
     Element.__init__(self, (None, 'error'), attribs={'type': type})
     self.addElement(error, Error.TYPES[error])