views:

46

answers:

1

How to parse xml data which have special characters ( ' , " , < , > etc) in iOS? In NSXmlParser's delegate, when it reads special characters ( ' , & ), it thinks this is open new eplement? How can i ignore those special characters?

+2  A: 

XML with those characters is invalid, unless they are contained within a CDATA. (In which case the xml parser shouldn't have a problem with them.)

I'd recommend running your XML through a validator and fixing any issues it finds.

Robot K
Thanks for your help :)
leduchuy89vn
Thanks for your help :) It need 2 steps to parse xml data which have special characters.Step 1: Replace special characters with valid character which list in this link http://xml.silmaril.ie/authors/specials/Step 2: Concatenate strings which breaked when you read it. http://www.iphonedevsdk.com/f
leduchuy89vn