I am trying to build a tree in php from an xml file : I am trying to read this xml file, but the code I am trying to make should work for any xml-file: [xml-file][1]

I am using these two [functions][2] to turn the xml-file into an array and turn that array into a tree. I am trying to keep the parent child relationship of the xml file. All I am getting back from the second function is an array with all the tags in the xml-file. 

Can someone please help me?


  [1]: http://i.stack.imgur.com/4g6pt.png
  [2]: http://i.stack.imgur.com/ADO3n.png