XML attribute vs XML element

前端 未结 20 2268
暖寄归人
暖寄归人 2020-11-22 01:34

At work we are being asked to create XML files to pass data to another offline application that will then create a second XML file to pass back in order to update some of ou

20条回答
  •  星月不相逢
    2020-11-22 02:04

    the million dollar question!

    first off, don't worry too much about performance now. you will be amazed at how quickly an optimized xml parser will rip through your xml. more importantly, what is your design for the future: as the XML evolves, how will you maintain loose coupling and interoperability?

    more concretely, you can make the content model of an element more complex but it's harder to extend an attribute.

提交回复
热议问题