• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Converting from HTML
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Converting from HTML


  • Subject: Converting from HTML
  • From: Drarok Ithaqua <email@hidden>
  • Date: Fri, 17 Oct 2008 03:17:50 +0100

Hi all, i'm trying to find a way to convert an HTML-originated URL into one I can use in cocoa.

Example input: <link type="application/rss+xml" rel="alternate" href="/ search/unique&amp;stuff&amp;here" />

I know the URL that this data is fetched from, so I can prefix that to achieve a full URL again, but I need to convert the &amp;
into plain ampersands, but there could be all kinds of HTML characters in there. Is there a category on NSString out there I could
use for this?


I read somewhere that I could use an NSAttributedString and initWithHTML, but that leaves me with an empty string. I'm guessing because it's
inside a <head> tag? Not sure.


I'm also open to using something more intelligent than my current method of searching the string for "<link " to find the rss feed, if there's perhaps an
easier way that would also convert the HTML characters for me. Maybe webkit has something for me?


I look forward to your replies, and you have my thanks in advance.

 - Drarok
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Converting from HTML
      • From: Aurora Phoenix <email@hidden>
    • Re: Converting from HTML
      • From: Mike Abdullah <email@hidden>
    • Re: Converting from HTML
      • From: Nathan Day <email@hidden>
  • Prev by Date: Re: Error in NSTask launch
  • Next by Date: Re: Error in NSTask launch
  • Previous by thread: Re: Error in NSTask launch
  • Next by thread: Re: Converting from HTML
  • Index(es):
    • Date
    • Thread