converting nsdata into nsdictionary
<p>i get the data from a xml file and i am storing it in nsdata object now i want to convert that nsdata into a dictionary and finally i want to store that data in plist,....</p>

<p>and my code is as follows</p>

<pre><code>NSURL *url = [NSURL URLWithString:@"http://www.fubar.com/sample.xml"];
    NSData *data = [NSData dataWithContentsOfURL:url]; 
    NSLog(@"%@", data);
</code></pre>

<p>for converting i am using</p>

<pre><code>- (NSDictionary *)downloadPlist:(NSString *)url {
    NSMutableURLRequest *request  = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:url] cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:10]; 
    NSURLResponse *resp = nil;
    NSError *err = nil;
    NSData *responseData = [NSURLConnection sendSynchronousRequest:request returningResponse:&amp;resp error:&amp;err];

    if (!err) {
        NSString *errorDescription = nil;
        NSPropertyListFormat format;
        NSDictionary *samplePlist = [NSPropertyListSerialization propertyListFromData:responseData mutabilityOption:NSPropertyListImmutable format:&amp;format errorDescription:&amp;errorDescription];

        if (!errorDescription)
            return samplePlist;

        [errorDescription release];              
    }

    return nil;
}
</code></pre>

<p>can any one please help me how to do that...</p>
