def sort_children(self, attribute=None, reverse_order=False):
        """
        Sorts the children using either the given attribute or the Node name.

        :param attribute: Attribute name used for sorting.
        :type attribute: unicode
        :param reverse_order: Sort in reverse order.
        :type reverse_order: bool
        :return: Method success.
        :rtype: bool
        """

        sorted_children = []
        if attribute:
            sortable_children = []
            unsortable_children = []
            for child in self.__children:
                if child.attribute_exists(attribute):
                    sortable_children.append(child)
                else:
                    unsortable_children.append(child)
            sorted_children = sorted(sortable_children, key=lambda x: getattr(
                x, attribute).value, reverse=reverse_order or False)
            sorted_children.extend(unsortable_children)
        else:
            sorted_children = sorted(self.children, key=lambda x: (x.name), reverse=reverse_order or False)

        self.__children = sorted_children

        for child in self.__children:
            child.sort_children(attribute, reverse_order)

        return True