0

I am trying to parse some data using nsxmlparser, whenever there is a &(ampersand) present in the text being received it just stops reading the parsed data. How can I read & normally, similar to other normal characters.

Thanks Pankaj

Kshitiz Ghimire
  • 1,716
  • 3
  • 18
  • 37
pankaj
  • 7,878
  • 16
  • 69
  • 115

2 Answers2

1

A lone ampersand in an XML document is not valid except in a CDATA section. You can either have your XML provider provide valid XML by either:

  1. Using the & character entity where you want ampersands.
  2. Putting text containing ampersands into a CDATA section.
dreamlax
  • 93,976
  • 29
  • 161
  • 209
0

Could not find the solution so i had to replace the & with some characters in backend and then again replace it in iphone while using it

pankaj
  • 7,878
  • 16
  • 69
  • 115