View Single Post
  #3 (permalink)  
Old August 15th, 2003, 08:47 PM
Patanjali Patanjali is offline
Registered User
Join Date: Aug 2003
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts

Your example 2 gives a flatter hierarchy and would generally be the best and most compact (each extra tag adds size and processing overhead).

However, you may want to include collection elements (such as your <categories> if you need to group sub-elements because:

- you need to qualify some of the sub-elements by a common attribute (or multiple common sub-elements), or

- you want to be able to visually inspect the file (in IE say) and a jumble of sub-elements is too confusing.

I find one of the helpful methods of analysing data structures is that used for normalising relational database structures.

Also the object-oriented inheritance tree design process help too. That is:
- Bubble commonality as high up the tree as you can, and
- Sediment differences as low in the tree as you can

Reply With Quote