开发者

Order of data in plist file?

Below is my plist file. When I pull out those inner dictionaries and display them, they are only displayed alphabetically BUT I would want them to be pulled out as they are in the plist and then be able to append another inner dictionary OR order the existing ones. Is there another better approach for 开发者_开发百科what i'm trying to do?

<plist version="1.0">
<dict>
    <key>z-key</key>
    <dict><key></key><string></string></dict>
    <key>a-key</key>
    <dict><key></key><string></string></dict>
    key>k-key</key>
    <dict><key></key><string></string></dict>
</dict>
</plist>

Many thanks, Bilal


Make the top level container an array instead of a dictionary. Arrays are ordered, dictionaries are not.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜