Hi, anyone!

I try to parse xml document using java. Then arrange each parse element into
array using java and give it id.

1. This id is used to track then position of the element.
2. This id should be able to be used of calculation of the distance.
for example: the distance from element A to element B.

Anyone can help with any idea or code.
One of the solution that I thought is to build it into compressed arrays,