• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to create a hierarchy using the following xml file  RSS feed

 
Balachandar Nayak
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends.

I have an XML file in the following format



The name tag represents the element and the source represents where I have to place the name tag.
I need to build a hierarchy in the following manner.



There can be 'n' level hierarchy with child elements. How to create a hierarchy in java?
Can you advice on this.

Thanks
Bala
 
Manuel Moons
Ranch Hand
Posts: 229
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can create classes which implement an interface or extend some superclass. They can have children (n) of the same type and perhaps a parent. Does this help you?

Eg.


Does this help you?

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!