• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Create tree in JSP  RSS feed

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Friends.

I want to create and display tree of the html element(made up of Html file - you can consider html source). Like Fire-bugger in Mozzila-fire fox
Means in right side panel HTMl page will be there and left side tree would be there containing html elements. When i extract tree and select any html element then it should highlight the element in the right side panel of displayed html page.

Any idea?

Thanks in advance.
 
Ranch Hand
Posts: 266
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think it can be done with JavaScript since the DOM is already available through the document object.
 
rutvi gen
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for help.

but can you tell me with more description or can give example to how to do it.
 
Satish Chilukuri
Ranch Hand
Posts: 266
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The W3C site has some pointers on accessing the DOM.

You can start with the html element with this:

var rootElement = document.getElementsByTagName("html")[0];

and find your way through its child elements.
 
Did you ever grow anything in the garden of your mind? - Fred Rogers. Tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!