HI there! I would like to ask how to store textfile contents into a variable or collection(array, vector), using tree structure is also welcome.

Here is a sample textfile content. I already managed to read the file and display its contents but it displays as is. I would like to know how to get the parameters in-between the tags and store or display it. In example the first phonebook entry in the textfile which is "1" for ID, "Ian" for Name, "09167419966" for contactnumber and "ian@yahoo.com" for e-mail.
Thanks you for your help

<PHONEBOOK>
<CONTACT>
<ID>1</ID>
<NAME>Ian</NAME>
<CONTACTNUMBER>09167419966</CONTACTNUMBER>
<EMAIL>ian@yahoo.com</EMAIL>
</CONTACT>

<CONTACT>
<ID>2</ID>
<NAME>Jonathan</NAME>
<CONTACTNUMBER>09167778963</CONTACTNUMBER>
<EMAIL>jon@yahoo.com</EMAIL>
</CONTACT>
<CONTACT>
</PHONEBOOK>