Skip navigation.
 
mlRe: XML Attributes
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];

Related mailsAuthorDate
mlXML Attributes Mr. Gecko May 3, 22:43
mlRe: XML Attributes Mr. Gecko May 3, 23:22
mlRe: XML Attributes Jens Alfke May 4, 05:14