def from_etree(cls, etree_element):
        """
        creates a ``SaltEdge`` instance from the etree representation of an
        <edges> element from a SaltXMI file.
        """
        ins = SaltElement.from_etree(etree_element)
        # TODO: this looks dangerous, ask Stackoverflow about it!
        ins.__class__ = SaltEdge.mro()[0]  # convert SaltElement into SaltEdge
        ins.layers = get_layer_ids(etree_element)
        ins.source = get_node_id(etree_element, 'source')
        ins.target = get_node_id(etree_element, 'target')
        return ins
creates a ``SaltEdge`` instance from the etree representation of an
        <edges> element from a SaltXMI file.