<?xml version="1.0" encoding="utf-8" ?> <sites id="0"> <siteName>London <groupName>Administration</groupName> <groupName>IT <groupName>IT Sales</groupName> <groupName>Helpdesk</groupName> </groupName> </siteName> </sites>
Above is just a sample snippet to highlight what I am trying to achieve. Basically I just want to have a way to traverse this. But with <divs> attached to each level with an onclick event which will display children of clicked node.
For example: London would be the element displayed, when clicked it will be overwritten with its childNodes in this case Administration & IT. When IT is clicked the childNodes IT Sales and Helpdesk will be displayed.