• 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
Question about TBXML
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Question about TBXML


  • Subject: Question about TBXML
  • From: "Eric E. Dolecki" <email@hidden>
  • Date: Tue, 09 Oct 2012 14:38:09 -0400

I have XML like this:

<questions>
   <question title="foo">
      <options>
         <option>Katsup</option>
         <option>Mustard</option>
      </options>
   </question>
...

While in the question element, I'd like to pull out each of those option
node values to create a mutable array from and stuff into a mutable
dictionary. I'm not sure how to do that (I'm using ARC)...

- (void)parseThatXML:(TBXMLElement *)element

{

    do {

        if(element -> firstChild)

            [self parseThatXML:element -> firstChild];



        if([[TBXML elementName:element] isEqualToString:@"question"])

        {

           NSMutableArray *array = [[NSMutableArray alloc] init];



            *//? how do I now dig into this question's options option
values?*

            while( ? ){



            }

        }



    } while ((element = element -> nextSibling));

}
_______________________________________________

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

  • Prev by Date: Hybrid Autolayout/Storyboard
  • Next by Date: Re: NSScreen ID Unreliable
  • Previous by thread: Re: Hybrid Autolayout/Storyboard
  • Next by thread: Input Method Kit
  • Index(es):
    • Date
    • Thread