Linked Questions
12 questions linked to/from Encode NSString for XML/HTML
1324
votes
13
answers
1.8m
views
What does <![CDATA[]]> in XML mean?
I often find this strange CDATA tag in XML files:
<![CDATA[some stuff]]>
I have observed that this CDATA tag always comes at the beginning, and then followed by some stuff.
But sometimes it is ...
600
votes
24
answers
545k
views
Swift - How to replace characters in a String?
I am looking for a way to replace characters in a Swift String.
In this example String: "This is my string"
I would like to replace the spaces, " ", with "+" to end up ...
75
votes
14
answers
98k
views
Objective C HTML escape/unescape
Wondering if there is an easy way to do a simple HTML escape/unescape in Objective C. What I want is something like this psuedo code:
NSString *string = @"<span>Foo</span>...
3
votes
3
answers
576
views
Looks like Apple converts strings incorrectly in UIActivityViewController
I was trying to figure out why UIActivityViewController sent a slightly converted string to share for Mail and WeChat.
This is my code:
let activityViewController = UIActivityViewController(...
2
votes
3
answers
3k
views
Decoding HTML entities on iPhone
I have a list of several locations, some of them containing the letters æ, Æ, ø, Ø, å and Å.
From the webservice I'm using, the letters comes out as "ø ;" "Å ;" etc.
When I ...
2
votes
2
answers
773
views
NOt able to parse "&"
My xml consist of words in few different language, Latin words etc.
am able to parse these Latin characters and all except the fact that I am not able parse only "&"
This is what I am ...
1
vote
0
answers
1k
views
HTML Encode an NSString iPhone
I have an rss feed that i am taking the description from using nsxmlparser. This is then output onto a tableview however it is html. is there a way to html encode a string in objective c on the iphone?...
1
vote
1
answer
1k
views
How to convert string to xml in iOS? (objective C, xcode 7.2)
I want to convert a NSString variable containing xml codes into xml format. My xml request is:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap....
0
votes
3
answers
826
views
Is there a way for NSString to display HTML character codes?
I have an NSString that has the following value:
"What#39;s up fellas!"
Is there a simple way to turn HTML char codes like #39; (equivalent to ') into an apostrophe etc?
0
votes
1
answer
773
views
Emailing HTML from within an iPhone app is stopping at special characters
I have an iPhone app that will let users email some pre-determined text as HTML.
I'm having a problem in that if the text contains special characters within the text (e.g., ampersand &,>, <)...
0
votes
2
answers
667
views
Parsing quotes and double quotes issue in iOS
I have a textview which can take any input and I need to parse the quotes and double quotes as ' and " respectively. So if I input a text in my text view like "Just testin'g quotes" ...
0
votes
0
answers
86
views
Encode NSString for XML using in SOAP
I am requesting to a SOAP server, everything is just fine but I have a small issue.
When users type non-English characters like Chinese, Japanese or Vietnamese, I need to encode it.
I have followed ...