I am Trying To Use NSXMLParser to parse an xml file using cocoa which goes like this..
<UserDetails>
<Name>John Doe</Name>
<UserName>jdoe</UserName>
<Password>supersecretpass</Password>
</UserDetails>
Now i am using the method as follows:
-(void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI: (NSString *)namespaceURI qualifiedName:(NSString *)qName attributes:(NSDictionary *)attributeDict
{
NSLog(@"MEthod came here");
if ([elementName isEqualToString:@"Name"]) {
NSLog(@"Name :");
}
}
I want to retrieve the values contained in the elementName tag. How do i do it..The method is being called but i am unable to retrieve the value contained within the tag values of XML.