@classmethod
    def fromXML(cls, element, parent):
        kw = loadxml.parseAttributes(element)
        obj = cls(parent, **kw)
        for child in element.getchildren():
            loadxml.getConstructor(child.tag)(child, obj)
        return obj
Create the object from the XML element and attach it to the parent.
dataset/ETHPy150Open ardekantur/pyglet/contrib/wydget/wydget/element.py/Element.fromXML