Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 07-13-2010, 03:56 AM   #1 (permalink)
Registered Member
 
Join Date: Jun 2010
Posts: 23
masse is on a distinguished road
Unhappy how to use the NSXMLParser.

hi. im iphone beginer developer.
i have a question.
can you help me?

its a xml address.
http://218.237.66.177/ufweb151/site....salFrame_cgvsm

and, i used this sample source code.
http://www.cocoadev.co.kr/attachment...3FC4133460.zip

i want to get a Location value of SiteInfo.

is it possible?
i very urgent...i need to ur help.
masse is offline   Reply With Quote
Old 07-13-2010, 05:44 AM   #2 (permalink)
Nuisance Developer
 
Join Date: Jul 2009
Location: Italy
Posts: 4,691
dany_dev is on a distinguished road
Default

Quote:
Originally Posted by masse View Post
hi. im iphone beginer developer.
i have a question.
can you help me?

its a xml address.
http://218.237.66.177/ufweb151/site....salFrame_cgvsm

and, i used this sample source code.
http://www.cocoadev.co.kr/attachment...3FC4133460.zip

i want to get a Location value of SiteInfo.

is it possible?
i very urgent...i need to ur help.
i think that anyone will look on your code for free. So if the question is "can you help me to understand it?" can be done, if your question is "please look my code, adjust it for me and attach it" this will not be done (at least i will not do it)

here you can read a step-by-step tutorial about NSXMLParser.
codesofa Make NSXMLParser your friend..
follow it and ask if there is something that you don't understand.
__________________

Last edited by dany_dev; 07-13-2010 at 06:09 AM.
dany_dev is offline   Reply With Quote
Old 07-13-2010, 05:55 AM   #3 (permalink)
Senior Member
 
Join Date: Feb 2010
Location: dallas
Posts: 219
gud4nuthin is on a distinguished road
Default

use NSXML parser to parse

do something like this
if(elements is Equalto "your value")
gud4nuthin is offline   Reply With Quote
Old 07-13-2010, 06:23 AM   #4 (permalink)
Registered Member
 
Join Date: Jun 2010
Posts: 23
masse is on a distinguished road
Default thx.

Quote:
Originally Posted by dany88 View Post
i think that anyone will look on your code for free. So if the question is "can you help me to understand it?" can be done, if your question is "please look my code, adjust it for me and attach it" this will not be done (at least i will not do it)

here you can read a step-by-step tutorial about NSXMLParser.
codesofa Make NSXMLParser your friend..
follow it and ask if there is something that you don't understand.
thx for your advice.

I regret what I did
masse is offline   Reply With Quote
Old 07-13-2010, 06:42 AM   #5 (permalink)
Registered Member
 
Join Date: Jun 2010
Posts: 23
masse is on a distinguished road
Talking um...

um...one more question. sorry

i ckecked your link. but, that xml hasn't a attributes.
how can access to that.

i think this attributes parameter of method is can do that.

- (void)parser: (NSXMLParser *)parser didStartElement: (NSString *)elementName namespaceURI: (NSString *)namespaceURI qualifiedName: (NSString *)qName attributes: (NSDictionary *)attributeDict
right?

(sorry my english is poor. so i study english every day..)
masse is offline   Reply With Quote
Old 07-13-2010, 06:50 AM   #6 (permalink)
Nuisance Developer
 
Join Date: Jul 2009
Location: Italy
Posts: 4,691
dany_dev is on a distinguished road
Default

Quote:
Originally Posted by masse View Post
um...one more question. sorry

i ckecked your link. but, that xml hasn't a attributes.
how can access to that.

i think this attributes parameter of method is can do that.

- (void)parser: (NSXMLParser *)parser didStartElement: (NSString *)elementName namespaceURI: (NSString *)namespaceURI qualifiedName: (NSString *)qName attributes: (NSDictionary *)attributeDict
right?

(sorry my english is poor. so i study english every day..)
if you mean "How to retrieve an attribute?" the answer is

Code:
if([elementName isEqualToString:@"field"]) {
  int num = [[attributeDict objectForKey:@"xmlnameatt"] integerValue];
}
it is a sample that assume that there is in the xml something like

Code:
<field xmlnameatt="1">
lol
</field>
also my english is poor.
__________________
dany_dev is offline   Reply With Quote
Old 07-13-2010, 09:27 PM   #7 (permalink)
Registered Member
 
Join Date: Jun 2010
Posts: 23
masse is on a distinguished road
Default thank you

Quote:
Originally Posted by dany88 View Post
if you mean "How to retrieve an attribute?" the answer is

Code:
if([elementName isEqualToString:@"field"]) {
  int num = [[attributeDict objectForKey:@"xmlnameatt"] integerValue];
}
it is a sample that assume that there is in the xml something like

Code:
<field xmlnameatt="1">
lol
</field>
also my english is poor.

your reply is very useful
masse is offline   Reply With Quote
Reply

Bookmarks

Tags
nsxmlparser

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 341
15 members and 326 guests
akphyo, alexP, appservice, cgokey, EXOPTENDAELAX, flamingliquid, guusleijsten, mariano_donati, ohmniac, Paul Slocum, PavelSea, SLIC, Sonuye857, v1n2e7t
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,653
Threads: 94,115
Posts: 402,888
Top Poster: BrianSlick (7,990)
Welcome to our newest member, ohmniac
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 10:38 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0