wood burning stoves 2.0*
The moose likes XML and Related Technologies and the fly likes Develop UI displaying Tree Using XML Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Develop UI displaying Tree Using XML" Watch "Develop UI displaying Tree Using XML" New topic
Author

Develop UI displaying Tree Using XML

Vikas Kulkarni
Greenhorn

Joined: Mar 24, 2006
Posts: 11
Hi Techies,
I am in the process of developing a UI that should show a tree (not like folder structure).
The tree should start from root node and that may contain n-children and similarly n-levels.
Currently I have a XML file that has the information about the Parent Children relationships.

I wanted to know how to parse this XML and put in the form of UI, the bottom line is, "Developing UI by using XMLfile in Java Code".

I hope I am clear.

Waiting for the reply(ies).
Thanks
- Vikas DK
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12678
    
    5
This tutorial on using the DOM (Document Object Model) should get you started.
Bill


Java Resources at www.wbrogden.com
Vikas Kulkarni
Greenhorn

Joined: Mar 24, 2006
Posts: 11
Hi Williams,
Thanks a million, I am going through the material that u sent, seems helpful.

I will ask doubts if i get any in midway

Thanks for your help

- Vikas DK
Vikas Kulkarni
Greenhorn

Joined: Mar 24, 2006
Posts: 11
Hi Williams,
The tutorial basically deals with the implementation of the JTree.
I DONT want to use JTree since it displays the tree in the form of directory structure .
I want my tree to be like B+ tree kind of.

I hope I am clear.

Thanks
- Vikas DK
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12678
    
    5
The way I see it there are three parts to your problem.

1. Designing a data structure that can hold the data in a form that makes it convenient to construct the display.

2. Extracting data from the DOM and placing it in that data structure.

3. Creating the display from the data structure.

XML is really only involved in part 2 and is not necessary in parts 1 and 3. If this was my problem I would start with sketches of what the display should look like from various types of data and tackle job 1 first. In other words, don't try to jump directly from XML to the display, work out part 1 first.
Ketan Khairnar
Ranch Hand

Joined: Jun 28, 2005
Posts: 34
Hmm
I have a rough solution..
I had done that in the past...but my UI was in JSPs..I had used dTree.js which is available freely on net and you have to modify contents in that JS runtime..which I htink is possible in your case(Java)
Vikas Kulkarni
Greenhorn

Joined: Mar 24, 2006
Posts: 11
Hi Ketan,
Do we need ABAP to run this script? I mean basically how to use this script and check the output. I tried finding the info over search engines but in vain.

Can u please help me ?

Thanks
- Vikas DK
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Develop UI displaying Tree Using XML
 
Similar Threads
How to go for Developing UI in XML
Help me in choosing a pattern
need clarification on tree
problems with hibernate: one-to-many and arrays
Drawing Tree