Hi Elena Thanks for your reply. I had seen that example earlier. But it does not work for me. I have also tried other ways but everytime for string attributes that have more than one dimension like a 2 or more array STRING, it only reads the first attribute string but skips the others. For 1D or scalar String attributes there is no problem. My hunch is since these strings are null terminated so no matter what I do its skipping the rest of the attributes the moment its coming across the first null terminating character terminating the first string array. Hence if thats true what I want to know is how to go around it? As an example say I have an attribute named: "N_AUX_FILENAME" (String, length = 105) with Array_Size = 2X1 and the two parts of the attribute are: 1. "EDR-AC_20020101010000Z_20020101010000Z_ee00000000000000Z_1_devl_dev_ops\0" 2. "EDR-DQTT_20020101010000Z_20020101010000Z_ee00000000000000Z_BASELINE-MON-1_devl_dev_ops\0"
I can only read the first string and not the whole array. So whats going wrong here and how to avoid it. Thanks On Fri, Oct 19, 2012 at 11:23 AM, Elena Pourmal <[email protected]>wrote: > Please look at the example posted here > http://www.hdfgroup.org/ftp/HDF5/examples/examples-by-api/hdf5-examples/1_8/C/H5T/h5ex_t_stringatt.c > > Elena > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Elena Pourmal The HDF Group http://hdfgroup.org > 1800 So. Oak St., Suite 203, Champaign IL 61820 > 217.531.6112 > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > > On Oct 19, 2012, at 9:03 AM, sudipta sarkar wrote: > > Folks > Can anyone show me a simple example of how to read a series of STRING > attributes where each are like one of of the following: > > ATTRIBUTE "N_Aux_Filename" { > DATATYPE H5T_STRING { > STRSIZE 105; > STRPAD H5T_STR_NULLTERM; > CSET H5T_CSET_ASCII; > CTYPE H5T_C_S1; > } > DATASPACE SIMPLE { ( 2, 1 ) / ( 2, 1 ) } > } > > ATTRIBUTE "N_Input_Prod" { > DATATYPE H5T_STRING { > STRSIZE 33; > STRPAD H5T_STR_NULLTERM; > CSET H5T_CSET_ASCII; > CTYPE H5T_C_S1; > } > DATASPACE SIMPLE { ( 4, 1 ) / ( 4, 1 ) } > } > > and so on..... > > Thanks and regards > _______________________________________________ > Hdf-forum is for HDF software users discussion. > [email protected] > http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org > > > > _______________________________________________ > Hdf-forum is for HDF software users discussion. > [email protected] > http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org > >
_______________________________________________ Hdf-forum is for HDF software users discussion. [email protected] http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
