I am parsing data from an rss. My problem is that the xmlparser dosn’t parse properly. it only parses data partly. So to explain my situation a bit better I will give you and example. So say suppose there is a speical charecter in a title (parsing the titles)
like
"This is a test"
and in rss it is written like this
<title>“This is a test“</title>
and when i try to parse the data I just get
a
"
why is doing this and How can i fix it here is some code
-(void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string{
currentNodeContent = [string stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
}
parser:foundCharacters:may be called several times with characters for the same element. You need to create a mutable string and append the characters untilparser:didStartElement:namespaceURI:qualifiedName:attributes:is called for the associated element. The xml decoding should be automatic and that is why you were just getting the ” which was just the last character(“) in your node.