@staticmethod
    def from_xml(node):
        if node.tag != 'locator':
            return None
        type_ = node.get('type', '')
        if str(type_) == 'file':
            for child in node.getchildren():
                if child.tag == 'name':
                    filename = child.text.encode('latin-1').strip()
                    return FileLocator(filename)
        return None
from_xml(node:ElementTree.Element) -> XMLFileLocator or None
dataset/ETHPy150Open VisTrails/VisTrails/vistrails/core/db/locator.py/FileLocator.from_xml