How to unwrap the content value from XML in Object

2019-03-06 18:22发布

问题:

I'm receiving correctly in XML file the value in debug.

- (void)connectionDidFinishLoading:(NSURLConnection *)connection 
{
    LogDebug(TAG_SETTINGS, @"Provisioning file downloaded, %lu bytes", (unsigned long)[self.provisioningData length]);

    NSString *content = [[NSString alloc] initWithData:self.provisioningData encoding:NSUTF8StringEncoding];
    LogDebug(TAG_SETTINGS, @"Downloaded data: \n%@", content);

    NSLog(@"Steve note:Here is the content of provisioning profile%@",content);
}

The content that I receive from XML are:

<settings>
  <setting name='Conference Number' value='#159' />
</settings>

What I need is value='#159', I don't know how to unwrap it and take the value.

Any help appreciate.

回答1:

Actually, no need to unwrap it, the value='#159' already unwrap it, so when I use the content, it already give me the '#159'.