Incorrect order of attributes in Qt XML

后端 未结 4 620
迷失自我
迷失自我 2021-01-18 15:18

I have the following code:

element.clear();
element.setTagName(\"accountpoint\");
element.setAttribute(\"code\", QString(ID_CONST)+serial);
element.setAttrib         


        
4条回答
  •  梦谈多话
    2021-01-18 15:56

    There is no such thing as a "right" order of XML attributes. Standard XML implementations can't care about it, and they don't, and rightly so.

    Human readability is about the only reason to worry about attribute order. If you want to write human-readable XML, you may need to roll your own code.

提交回复
热议问题