nfarina/xmldocument — Issue #7: can't extract first element's attributes
Author: justgig8
Created: 2012-02-25 20:45:43+00:00
State: open

This code doesn't work!

NSData* data=[xml dataUsingEncoding: NSUTF8StringEncoding];
SMXMLDocument *document = [SMXMLDocument documentWithData:data error:nil];
SMXMLElement *response = [document.root childNamed:@"response"];
NSLog(@"element: %@", response);
NSLog(@"response type: %@", [response attributeNamed:@"type"]);

when my xml is as follows:-

2012-02-25 13:33:50