I've looked all over the web but just can't figure out how to get the text from a node in Objective-C. I'm using TouchXML and I am getting my node list. I want the title text from a node, but instead I get a node object. My code is:
resultNodes = [xmlParser nodesForXPath:@"SearchResults/SearchResult" error:&err];
for (CXMLElement *resultElement in resultNodes) {
NSString *value = [resultElement elementsForName:@"Title"];
}
If I log the value to the console I get:
<CXMLElement 0x3994b10 [0x39732a0] Title <Title HtmlEncoded="true">test question</Title>>
I want the text, i.e test question
instead. I am banging my head against a brick wall here.