You need to use an XML Parser to parse the file and providing the XML is 'well-formed' you will be able to navigate the XML structure.
I would recommend you use a DOM parser , this will give you...