如何将此 XML 反序列化为对象?
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>key1</key>
<dict>
<key>title</key>
<string>Name1</string>
<key>price</key>
<string>1000$</string>
<key>count</key>
<string>60</string>
<key>description</key>
<string>some description</string>
<key>photoUrl</key>
<string>http:/someurl</string>
</dict>
</dict>
<dict>
<key>key2</key>
<dict>
<key>title</key>
<string>Name2</string>
<key>price</key>
<string>2000$</string>
<key>count</key>
<string>35</string>
<key>description</key>
<string>some description</string>
<key>photoUrl</key>
<string>http://someurl</string>
</dict>
</dict>
我认为我的对象应该有一个字典作为字段,但是我在代码中定义适当的类时遇到了问题。这个怎么做?
谢谢。