Attribute name
attr_name = H5A.get_name(attr_id)
attr_name = H5A.get_name(attr_id,'TextEncoding',encoding)
attr_name = H5A.get_name(attr_id)
returns
the name of the attribute specified by attr_id
.
attr_name = H5A.get_name(attr_id,'TextEncoding',encoding)
specifies the text encoding to use to interpret the attribute name. Specify
encoding
as 'system'
(default) or
'UTF-8'
.
'system'
— Use the system default encoding to
interpret the attribute name.
'UTF-8'
— Use UTF-8
encoding to
interpret the attribute name.
fid = H5F.open('example.h5'); gid = H5G.open(fid,'/g1/g1.1'); idx_type = 'H5_INDEX_NAME'; order = 'H5_ITER_INC'; attr_id = H5A.open_by_idx(gid,'dset1.1.1',idx_type,order,0); name = H5A.get_name(attr_id); H5A.close(attr_id); H5G.close(gid); H5F.close(fid);