【发布时间】:2023-03-31 12:21:01
【问题描述】:
构建用于返回名称/值组列表的 XML 标记的首选版本是什么?
<variables>
<item>ok</item>
<another>123</another>
<catch>me</catch>
</variables>
或
<variables>
<variable name="item" value="ok"/>
<variable name="another" value="123"/>
<variable name="catch" value="me"/>
</variables>
我认为第二种形式更好,但是有没有官方的 W3C 建议或“设计模式”?
【问题讨论】: