The following code, trying to fill in data.
But the data does not fill.NSURL *request = [NSURL URLWithString:@"http://iphone.developer.tv.tr/PList/Kurlar.aspx?type=1"];
NSMutableDictionary *plistDictionary = [NSMut开发者_运维百科ableDictionary dictionaryWithContentsOfURL:request];
NSLog(@"The count: %i", [plistDictionary count]);
The file doesn't look like a valid NSDictionary representation for me.
<?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">
<dict>
<key>Kod</key>
<string>USD</string>
<key>Baslik</key>
<string>Amerikan Doları</string>
<key>Adet</key>
<integer>1</integer>
<key>DovizAlis</key>
<real>1,5886</real>
<key>DovizSatis</key>
<real>1,5963</real>
<key>EfektifAlis</key>
<real>1,5875</real>
<key>EfektifSatis</key>
<real>1,5987</real>
</dict>
<dict>
...
</dict>
<dict>
...
</dict>
<dict>
...
</dict>
There is no "root" dictionary. The plist editor can open it but only shows the first dictionary. So I guess this is just an invalid file.
I did all the text fields. not filling. URL: http://iphone.developer.tv.tr/PList/Kurlar.aspx
精彩评论