Can I enforce the order of XML attributes using a schema?

后端 未结 8 1901
囚心锁ツ
囚心锁ツ 2020-12-06 10:01

Our C++ application reads configuration data from XML files that look something like this:


 

        
8条回答
  •  自闭症患者
    2020-12-06 10:53

    XML attributes don't have an order, therefore there is no order to enforce.

    If you want something ordered, you need XML elements. Or something different from XML. JSON, YAML and bEncode, e.g. have both maps (which are unordered) and sequences (which are ordered).

提交回复
热议问题