Hello.
i parse xml using NSXMLParser.
But i get xml encoded strings looks like
(i inserted space between & #8217; otherwise it is converted to correct symbol here)
and text extracted from this looks like
instead of We&'ve been ....
How i can avoid/remove/convert all such html encoded entities?
thanx for tip.
Here is code i use
i parse xml using NSXMLParser.
But i get xml encoded strings looks like
Code:
<![CDATA[We & #8217;ve been ....]]>
and text extracted from this looks like
Code:
We’ve been ....
How i can avoid/remove/convert all such html encoded entities?
thanx for tip.
Here is code i use
Code:
NSData *dat = [NSData dataWithContentsOfURL:[NSURL URLWithString:@"someurl"]];
NSString* data = [[[NSString alloc] initWithData:dat encoding:NSUTF8StringEncoding] autorelease];
XMLParser* parser = [[XMLParser alloc] init];
[parser parseXMLData: data];
NSData* ndata = [data dataUsingEncoding: NSUTF8StringEncoding];
NSXMLParser *parser = [[NSXMLParser alloc] initWithData:ndata];