• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
XML Attributes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

XML Attributes


  • Subject: XML Attributes
  • From: "Mr. Gecko" <email@hidden>
  • Date: Sat, 3 May 2008 15:43:14 -0500

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
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: XML Attributes
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Re: Real time video analysis app under Cocoa
  • Next by Date: Re: XML Attributes
  • Previous by thread: Re: most efficient way to string CIFilters together?
  • Next by thread: Re: XML Attributes
  • Index(es):
    • Date
    • Thread