Is it wrong in XML to have element nodes as siblings of text nodes?

后端 未结 3 1078
终归单人心
终归单人心 2021-01-20 07:42

Is the following \"allowed\" or simply bad use of XML? I cannot find restrictions on this, but it feels a bit weird.


    You can choose from
         


        
3条回答
  •  旧巷少年郎
    2021-01-20 08:13

    In addition to the answers above (with which I agree) I would add that it depends on the purpose of the XML document. If the purpose is to communicate business data between applications then validation of the entire document may be a requirement. Mixed content cannot be strictly validated using XML Schema, and is usually avoided in business-to-business communications unless it is for documentation purposes only.

提交回复
热议问题