def processXML(self, xmlFile): keys = [] sequence = xmeml.VideoSequence(file=xmlFile) for item in sequence.track_items: filePath = None try: if item.in_frame: for n in item.dom.childNodes: if n.nodeType == 1 and n.tagName in ('file'): for t in n.childNodes: if t.nodeType == 1 and t.tagName in ( 'pathurl'): filePath = xmeml.xml2dict(t).replace( "file://localhost", "") filePath = filePath.replace("%20", " ") self.addKey(item.id, filePath, "%s-%s" % (item.in_frame, item.out_frame), keys, xmlFile) except: pass keys = sorted(keys, key=attrgetter('id')) return keys
def processXML(sequence, keyfolder): keys = [] for item in sequence.track_items: filePath = None try: if item.in_frame: for n in item.dom.childNodes: if n.nodeType==1 and n.tagName in ('file'): for t in n.childNodes: if t.nodeType==1 and t.tagName in ('pathurl'): filePath = xmeml.xml2dict(t).replace("file://localhost", "") addKey(item.id, filePath, "%s-%s" % (item.in_frame, item.out_frame)) except: pass return keys
def processXML(sequence, keyfolder): keys = [] for item in sequence.track_items: filePath = None try: if item.in_frame: for n in item.dom.childNodes: if n.nodeType == 1 and n.tagName in ('file'): for t in n.childNodes: if t.nodeType == 1 and t.tagName in ('pathurl'): filePath = xmeml.xml2dict(t).replace( "file://localhost", "") addKey(item.id, filePath, "%s-%s" % (item.in_frame, item.out_frame)) except: pass return keys
def processXML(self, xmlFile): keys = [] sequence = xmeml.VideoSequence(file=xmlFile) for item in sequence.track_items: filePath = None try: if item.in_frame: for n in item.dom.childNodes: if n.nodeType==1 and n.tagName in ('file'): for t in n.childNodes: if t.nodeType==1 and t.tagName in ('pathurl'): filePath = xmeml.xml2dict(t).replace("file://localhost", "") filePath = filePath.replace("%20", " ") self.addKey(item.id, filePath, "%s-%s" % (item.in_frame, item.out_frame), keys, xmlFile) except: pass keys = sorted(keys, key=attrgetter('id')) return keys