'Create an XBlock instance from XML data.
Args:
xml_data (string): A string containing valid xml.
system (XMLParsingSystem): The :class:`.XMLParsingSystem` used to connect the block
to the outside world.
id_generator (IdGenerator): An :class:`~xblock.runtime.IdGenerator` that
will be used to construct the usage_id and definition_id for the block.
Returns:
XBlock: The fully instantiated :class:`~xblock.core.XBlock`.'

def xblock_from_node(self, node, parent_id, id_generator=None):

    id_generator = (id_generator or self.id_generator)
    block_type = node.tag
    node.attrib.pop('xblock-family', None)
    url_name = node.get('url_name')
    def_id = id_generator.create_definition(block_type, url_name)
    usage_id = id_generator.create_usage(def_id)
    keys = ScopeIds(None, block_type, def_id, usage_id)
    block_class = self.mixologist.mix(self.load_block_type(block_type))
    aside_children = self.parse_asides(node, def_id, usage_id, id_generator)
    asides_tags = [x.tag for x in aside_children]
    block = block_class.parse_xml(node, self, keys, id_generator)
    self._convert_reference_fields_to_keys(block)
    block.parent = parent_id
    block.save()
    asides = self.get_asides(block)
    for asd in asides:
        if (asd.scope_ids.block_type in asides_tags):
            block.add_aside(asd)
    return block
