Want a serious answer?
An xml contains data.
This data can be converted to a java model.
You have an ArrayList<YourModelHere> or HashMap<YourModelHere.id,YourModelHere> depending on what you want to do.
In your loop during the parsing of the xml you will add a new instance of YourModelHere and add it to this lost.
Then you can access any object from the list or map.
What is hard about it?