I’m working with a label tree in java program
something like this, the labels in same level are share the same name, the numbering just for easier to explain:
Label A1
Label B1
Label A2
Label B2
Label B3
Label C1
Label A3
Label B4
Then I am able to get specific element(let say Label C1) with selector like:
<Label A idx=‘2’><Label B idx=‘2’><Label C idx=‘1’>
but how can I get the idx of this element as a label in the whole TREE? the idx of it should be ‘6’ in this case