I want to retrieve all the nodes present in particular DIV element.see the below test page (firefox)
New Document <
Comments are nodes in the DOM tree, but they don't have a tag name. The getElementsByTagName method only returns nodes that have a tag name.
getElementsByTagName
If you want all nodes, you have to traverse the DOM tree, using the childNodes collection of each element.
childNodes