Skip navigation.
 
mlXML Attributes
FROM : Mr. Gecko
DATE : Sat May 03 22:43:14 2008

Ok I was able to one of the childs from my xml file now what I am 
asking is how to get the attributes from it
I uses this
NSXMLDocument *xml = [[NSXMLDocument alloc] initWithData:[NSData 
dataWithContentsOfURL:[NSURL URLWithString:@"http://www.example.com/xmlfile.xml
"]] options:NSXMLDocumentTidyXML error:NULL];
NSXMLNode *nodes = [xml rootElement];
NSXMLNode *node = [[nodes childAtIndex:1] childAtIndex:0];
to get this
<file url="http://www.example.com/file1" size="522656" name="File 
Number 1"></file>
so now how do I get an attribute from it such as url, or name.  I saw 
in NSXMLElement documentation that it had an attribute thing but I 
can't figure out how to convert the node to NSXMLElement to get the 
attribute.

Thanks for any help,
Mr. Gecko

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