0
我正在设计自己的GUI,并使用XML来存储它。它具有对儿童有特殊属性的元素,TabFolder具有每个孩子的标签名称,Window具有每个孩子的位置。是否有与父元素相关的元素参数?
实施例1:
<tabfolder>
<stuff tabtitle="Stuff">...</stuff>
<stuff tabtitle="Stuff2">...</stuff>
</tabfolder>
<window>
<button position="title_right" id="close"></button>
<button position="title_right" id="hide"></button>
<stuff position="content"></stuff>
</window>
实施例2:
<tabfolder>
<tab>
<title>Stuff</title>
<content><stuff>...</stuff></content>
</tab>
<tab>
<title>Stuff2</title>
<content><stuff>...</stuff></content>
</tab>
</tabfolder>
<window>
<title_right>
<button id="close"></button>
<button id="hide"></button>
</title_right>
<content><stuff></stuff></content>
</window>
在以下这些实例示出了适当的方式去吗?
第一次短路。 2nd看起来更标准。