I am currently working on an XML document that was written for an XML hierarchy with only 2 levels. Right now, I want to add a one-to-many categorization to it that would break most of the code that works with that file.
I could either add that categorization as a new level, or I can implement it as a attribute on the same level (almost like tagging).
current:
<category>
<subcategory></subcategory>
<category>
proposed:
<supercategory>
<category>
<subcategory></subcategory>
</category>
</supercategory>
or:
<category supercategory="">
<subcategory></subcategory>
</category>
Which method is more maintainable?