Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to represent a tree of hierarchical object in xml 2

Status
Not open for further replies.

kalos80

Programmer
Nov 8, 2006
2
IT
Hi,

I have a tree that I need to save on an XML file.

The tree is made up by nodes that can have different types,
say NodeTypeA, NodeTypeB,... NodeTypeX.

All nodes have some common properties, i.e. "node name", and all nodes belonging to the same type have the same specific properties that can be different from the specific properties of nodes belonging to another type.

NodeTypeA
{
prt A
prt B

prt C
prt E
prt F
}

NodeTypeB
{
prt A
prt B

prt G
prt Z
prt F
}

NodeTypeX
{
prt A
prt B

prt H
prt I
prt C
}

Clearly each node can have children nodes.

Someone could suggest me the best way to represent such tree in XML?

thanks so much for your help.


 
Diancecht, thank you very very much for the link you suggested.

It gave me some ideas on how I can design the structure of my xml file.
 
Nice pointer, Dian! Have a star, and I'll include the link in my FAQ.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top