Josh Sherick
Josh Sherick

Reputation: 2161

How to get rid of > < (html tags) in woot.com API?

I am making a <a href="http"//www.woot.com">woot app, and I am using the API. in the description section of the XML rss file, there are always a lot of &gt; and &lt; (less than and greater than < >) surrounding the html tags. I realize they did this so as not to confuse them with the XML tags, but it is kind of annoying. I can't just put the code that I get from the XML file right into a webview, because it displays the less than and greater than signs, and does not actually do the tags. Is there any way to get rid of this easily, or do I just have to make a loop that goes through all of the code, changing the &lt;/tr&gt; to </tr>? I am just wondering how other people have gotten around this problem, or if there is some easy way to do it that I just don't know about.

Upvotes: 0

Views: 988

Answers (2)

tidwall
tidwall

Reputation: 6949

The xml rss file that you are looking at has HTML encoded inside of XML. All you need to do is use an existing XML library for the iPhone such as NSXMLParser or GDataXML and you will not have to worry about decoding.

Upvotes: 1

ataddeini
ataddeini

Reputation: 4951

The content is encoded and you just need to decode it--once you do that it should just render like regular html. I would try to do that first before doing any kind of replace. I'm not an iphone developer but maybe this link can help.

Upvotes: 1

Related Questions