XML attribute vs XML element

前端 未结 20 2577
暖寄归人
暖寄归人 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:07

    XML Element vs XML Attribute

    XML is all about agreement. First defer to any existing XML schemas or established conventions within your community or industry.

    If you are truly in a situation to define your schema from the ground up, here are some general considerations that should inform the element vs attribute decision:

    
      
        Content
      
      
        
          Hierarchical
        
      
      
        
    1. Has
    2. order
    Can reference to re-use For humans Extreme use leads to document bloat Unique or non-unique names SAX parse: read later DTD: no default value

提交回复
热议问题