Restores an object from XML.

        :param      xml | <xml.etree.ElementTree.Element>

        :return     subclass of <XmlObject>

def fromXml(cls, xml):
        """
        Restores an object from XML.

        :param      xml | <xml.etree.ElementTree.Element>

        :return     subclass of <XmlObject>
        """
        clsname = xml.get('class')
        if clsname:
            subcls = XmlObject.byName(clsname)
            if subcls is None:
                inst = MissingXmlObject(clsname)
            else:
                inst = subcls()
        else:
            inst = cls()

        inst.loadXml(xml)
        return inst