I have an exercise where it calls upon me to use recursion to output XML data into HTML list tags. Shamefully admitting my shortcomings in mathematics, I would like someone to show me how to implement recursive logic to XML's 'node structure' using JavaScript.
Here is the outcome: JSFiddle
EDIT Added sample XML to round off this topic and deleted unneeded code. The XML used to create the recursive function:
<ddm>
<menu0 submenu="true"><name>Welcome</name>
<menu1>Home Page</menu1>
<menu1>Bulletin</menu1>
</menu0>
<menu0 submenu="true"><name>Members\' Area</name>
<menu1>Constitution & Bylaws</menu1>
<menu1 submenu="true"><name>AGM Minutes</name>
<menu2>2012</menu2>
<menu2>2011</menu2>
</menu1>
</menu0>
<menu0>About</menu0>
</ddm>
<ddm>