The PHP manual has a whole section on PHP parsing:
- http://php.net/manual/en/book.simplexml.php
- http://php.net/manual/en/book.xml.php
For simplicity, you could also use xml_parse_into_struct()
Here's a pretty good example, using SimpleXML:
http://blog.teamtreehouse.com/how-to-parse-xml-with-php5