On Apr 29, 2011, at 2:23 PM, Konrad Hinsen wrote:
> On 29 Apr 2011, at 18:19, Mark Kelly wrote:
>
>> Does anyone know how to retrieve the parent group from an open dataset or
>> open child group? In other words, navigate 'backwards' from a child to the
>> parent.
>
> You can ask for the path to the node you have (H5Rget_name) and strip away
> the last part. Note that due to the complexities introduced by links and
> references, a node can have multiple names or even none at all, but in most
> practical situation this approach should work fine.
Yes, that may work (probably with H5Iget_name, though) in many cases.
The limitation here is that since an HDF5 groups/datasets/etc may have multiple
hard links to it (i.e. have multiple "parents"), we don't store any "parent"
information on objects.
Quincey
_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org