Print The DOM Node Tree
A user on one of forums posted this link: http://www.permadi.com/tutorial/domTree/index.html to a tutorial on the DOM Node. The script there is rather interesting to anyone that does not understand the structure of a document.
An example output from the script with IE6 is:
<HTML> ¦ ¦--<HEAD> ¦ ¦ ¦ ¦--<TITLE> ¦ ¦ </TITLE> ¦ </HEAD> ¦ ¦--<BODY> ¦ ¦ ¦ ¦--<TABLE> ¦ ¦ ¦ ¦ ¦ ¦--<TBODY> ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--<TR> ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--<TD> ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--[unknown tag] ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ </TD> ¦ ¦ ¦ ¦ </TR> ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--<TR> ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--<TD> ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--[unknown tag] ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ </TD> ¦ ¦ ¦ ¦ </TR> ¦ ¦ ¦ </TBODY> ¦ ¦ </TABLE> ¦ </BODY> </HTML>
I guess my geek in me things this is cool.
Hope this helps you out.
Eric Pascarello
Moderator of HTML/JavaScript at www.JavaRanch.com
Author of: JavaScript: Your Visual Blueprint for Dynamic Web Pages
TrackBacks[0]
Comments[0]
Posted by pascarello on May 21, 2005 8:31:17 AM EST
TrackBack to http://radio.javaranch.com/pascarello/addTrackBack.action?entry=1116682277719