I need help developing javascript code that will run through a webpage and recreate the DOM tree structure of the page in text form. I've been told to use a recursive function. I don't really know any javascript. At each node I need the node name and the node type. Any help?
here is an article with example how to recursive traverse DOM via jQuery: http://www.jameswiseman.com/blog/2010/08/24/manually-traverse-a-dom-tree-using-jquery/ I hope it helps.