Re: Parsing XML - looping through records.
Re: Parsing XML - looping through records.
- Subject: Re: Parsing XML - looping through records.
- From: Ian was here <email@hidden>
- Date: Sat, 9 Apr 2005 21:53:13 -0700 (PDT)
- Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
What I would do first is the following:
NSLog( @"%@", iTunesDatabase);
This will display the contents of your dictionary in
the run log window, and will allow you to see what XML
data you have and perhaps a good idea on how to deal
with it.
I've only written one XML parsing class using arrays.
The purpose was to get an XML text file and load it
into a PostgreSQL database. I'm not 100% sure on how
to do this with a dictionary. I would imagine your
dictionary has an XML tag/XML data as a key/pair
value.
You could try loading your data into an array, search
for tag values in a for-next loop, adding the desired
data to the NSPopUp button list.
Wish I could help more...
--- Jerry Brace <email@hidden> wrote:
> This is what I have:
>
> NSURL * iTunesDatabaseLocation = [NSURL
> fileURLWithPath:[@"~/Music/iTunes/iTunes Music
> Library.xml"
> stringByExpandingTildeInPath]];
> NSDictionary * iTunesDatabase = [NSDictionary
> dictionaryWithContentsOfURL:iTunesDatabaseLocation];
>
> Thanks for any help!
>
> I'm on iChat as well: email@hidden
>
> Cheers,
> jerry
>
>
> On 9-Apr-05, at 4:43 PM, Ian was here wrote:
>
> > I did it using an NSArray, getting the tag values
> as
> > the XML data was being loaded in. What exactly do
> you
> > have in your NSDictionary? Tags, data, or both?
> >
> >
> >
> >
> > --- Jerry Brace <email@hidden> wrote:
> >> I have an NSDictionary filled with XML data -
> could
> >> anyone give me some
> >> tips on how to loop through the records in this
> >> dictionary?
> >> I wish to add all items found within to a
> >> NSPopupButton list.
> >>
> >> Cheers,
> >>
> >> Jerry Brace
> >> Web and Multimedia Developer
> >> email@hidden
> >>
> >> _______________________________________________
> >> Do not post admin requests to the list. They will
> be
> >> ignored.
> >> Cocoa-dev mailing list
> >> (email@hidden)
> >> Help/Unsubscribe/Update your Subscription:
> >>
> >
>
> >>
> >> This email sent to email@hidden
> >>
> >
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! Small Business - Try our new resources
> site!
> > http://smallbusiness.yahoo.com/resources/
> >
> >
> Jerry Brace
> Web and Multimedia Developer
> email@hidden
>
__________________________________
Do you Yahoo!?
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden