Select elements from a set of nodes

Hi all,
Is there any direct api to select elements from a set of nodes?( For example in the image i need the highlighted elements, dont need the adjacent elements to be selected.)
I tried *findmark and *createmark which are selecting the nearby elements too.


Another solution you can try is the following:
hm_createmark nodes 1 'by id only' $NodeList; hm_createmark nodes 1 advanced reverse; hm_createmark elems 1 'by nodes' [hm_getmark nodes 1]; hm_getmark elems 1;

Nice trick @tinh, @akitoguc /emoticons/default_biggrin.png' srcset='/emoticons/biggrin@2x.png 2x' title=':D' width='20' />
Works for me!

Just another way to handle this....
*createmarkpanel nodes 1 'Select nodes to which the attached elements have to be determined'
eval '*createmark elems 1 \'by nodes\' [hm_getmark nodes 1]'
eval '*createmark nodes 2 \'by elems\' [hm_getmark elems 1]'
*marknotintersection nodes 1 nodes 2
eval '*createmark elems 2 \'by nodes\' [hm_getmark nodes 1]'
*markdifference elems 1 elems 2
set attached_elem_list [hm_getmark elems 1]

Tested all methods, last one runs faster on bigger assemblies (saves around 5 sec /emoticons/default_wink.png' srcset='/emoticons/wink@2x.png 2x' title=';)' width='20' /> ).
Thanks again all!
Hi Vipin
You can ignore adjacent elems
*createmark nodes 1 {*}$NodeList
*createmark elems 1 'by node' {*}[hm_getmark nodes 1]
*createmark elems 1 reverse
*appendmark elems 1 'by adjacent'
*createmark elems 1 reverse