views:

38

answers:

2

Hello.

I'm trying to figure out how to get the value between two tags of an XML text that is being parsed in objective c.

For example, if you have:

<tag>thetext</tag>

I want to be able to get thetext

This seems impossible with the NSXMLParser class or its delegate.

Any help would be appreciated. Thanks!

+1  A: 

With the delegate method :

-(void)parser:(NSXMLParser*)parser foundCharacters:(NSString*)string
Benj
A: 

I recommend to use TBXML. As long as the tags are known, it's really easy to parse the xml. ;-)

Sandro Meier