0

I am facing a parser problem in my project.I am getting data from an xml,In that I have special characters like &amp,%20....I would like to convert those symbols into the regular characters like &,space( ) . Kindly help me to solve this problem.

I know one way,is we need to replace the &amp with &.But is there any parser properties to convert those special characters into symbols?

Tendulkar
  • 5,550
  • 2
  • 27
  • 53

1 Answers1

2

duplicate of Objective C HTML escape/unescape

as per suggestion of Michael Waterfall in that post..

we have some categories of NSString for escaping the html tags, download here

- (NSString *)stringByConvertingHTMLToPlainText;
- (NSString *)stringByDecodingHTMLEntities;
- (NSString *)stringByEncodingHTMLEntities;
- (NSString *)stringWithNewLinesAsBRs;
- (NSString *)stringByRemovingNewLinesAndWhitespace;
Community
  • 1
  • 1
vishy
  • 3,241
  • 1
  • 20
  • 25