tags:

views:

15

answers:

1

this is my property list data in NSdata fotmat which i try to deserialize

<?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"&gt;
<plist version="1.0">
<array>
<dict>
<Key>Secondfactor</Key>
<string>0</string>
</dict>
</array>
</plist>

NSArray *theArray=[NSPropertyListSerialization propertyListFromData:mResultData mutabilityOption:NSPropertyListImmutable format:NULL errorDescription:nil];

theArray is Always null

A: 

Have you tried passing and reading out an error string?

NSString *error;

[NSPropertyListSerialization propertyListFromData:mResultData mutabilityOption:NSPropertyListImmutable format:NULL errorDescription:&error];

if (error) {
    NSLog(@"error: %@", error);
    [error release];
}
klaaspieter
ya got it in key tag k was capital .so why it was giving problemThanks john
pawan.mangal