def get_datatype_str(self, element, length):
        '''get_datatype_str

        High-level api: Produce a string that indicates the data type of a node.

        Parameters
        ----------

        element : `Element`
            A node in model tree.

        length : `int`
            String length that has been consumed.

        Returns
        -------

        str
            A string that indicates the data type of a node.
        '''

        spaces = ' '*(self.get_width(element) - length)
        type_info = element.get('type')
        ret = ''
        if type_info == 'anyxml' or type_info == 'anydata':
            ret = spaces + '<{}>'.format(type_info)
        elif element.get('datatype') is not None:
            ret = spaces + element.get('datatype')
        if element.get('if-feature') is not None:
            return ret + ' {' + element.get('if-feature') + '}?'
        else:
            return ret