asedra_le
asedra_le

Reputation: 3067

How to parse xml data which have special characters in iOS?

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?

Upvotes: 3

Views: 1768

Answers (1)

Kris Markel
Kris Markel

Reputation: 12112

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.

Upvotes: 2

Related Questions