FROM : Mr. Gecko
DATE : Sat May 03 23:22:41 2008
Thanks it works
here is my updated code
NSXMLDocument *xml = [[NSXMLDocument alloc] initWithData:[NSData
dataWithContentsOfURL:[NSURL URLWithString:@"http://www.example.com/xmlfile.xml
"]] options:NSXMLDocumentTidyXML error:NULL];
NSXMLNode *node = [xml rootElement];
NSString *name = [[(NSXMLElement *)[[node childAtIndex:1] childAtIndex:
0] attributeForName:@"name"] stringValue];
On May 3, 2008, at 3:54 PM, John Calsbeek wrote:
> I believe what you've got is an NSXMLElement (you can see this using
> the -kind method). You just need to cast it as one:
>
> NSXMLElement *node = (NSXMLElement *)[[nodes childAtIndex:1]
> childAtIndex:0];
DATE : Sat May 03 23:22:41 2008
Thanks it works
here is my updated code
NSXMLDocument *xml = [[NSXMLDocument alloc] initWithData:[NSData
dataWithContentsOfURL:[NSURL URLWithString:@"http://www.example.com/xmlfile.xml
"]] options:NSXMLDocumentTidyXML error:NULL];
NSXMLNode *node = [xml rootElement];
NSString *name = [[(NSXMLElement *)[[node childAtIndex:1] childAtIndex:
0] attributeForName:@"name"] stringValue];
On May 3, 2008, at 3:54 PM, John Calsbeek wrote:
> I believe what you've got is an NSXMLElement (you can see this using
> the -kind method). You just need to cast it as one:
>
> NSXMLElement *node = (NSXMLElement *)[[nodes childAtIndex:1]
> childAtIndex:0];
| Related mails | Author | Date |
|---|---|---|
| Mr. Gecko | May 3, 22:43 | |
| Mr. Gecko | May 3, 23:22 | |
| Jens Alfke | May 4, 05:14 |






Cocoa mail archive

