• 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
Re: Does initWithHTML:dataUsingEncoding:documentAttributes: run an event loop?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Does initWithHTML:dataUsingEncoding:documentAttributes: run an event loop?


  • Subject: Re: Does initWithHTML:dataUsingEncoding:documentAttributes: run an event loop?
  • From: Alex Kac <email@hidden>
  • Date: Thu, 09 May 2013 13:14:41 -0600

I'd strongly recommend a great tool from the DTCoreText github project - DTHTMLWriter and DTHTMLReader. It is designed to work with HTML documents and turn them into XML or like (he uses it for NSAttributedStrings).

I've been using this project very heavily and it works extremely well. For example I use it to convert HTML to ENML for Evernote. It works with loads of poorly formatted HTML.

On May 9, 2013, at 12:58 PM, Jens Alfke <email@hidden> wrote:

>
> On May 9, 2013, at 10:53 AM, Markus Spoettl <email@hidden> wrote:
>
>> Well, that's not entirely true, unfortunately. Although the documentation suggests you can, NSXMLDocument -init.... will crash if the content you're trying to feed it is sufficiently non-XML (say an ASCII text file).
>
> Well, that’s bad, especially since one of the purposes of tidy is to make it safe to read untrusted XML/HTML input.
> Have you reported this to Radar?
>
> —Jens


_______________________________________________

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


References: 
 >Does initWithHTML:dataUsingEncoding:documentAttributes: run an event loop? (From: Jean Suisse <email@hidden>)
 >Re: Does initWithHTML:dataUsingEncoding:documentAttributes: run an event loop? (From: Ken Thomases <email@hidden>)
 >Re: Does initWithHTML:dataUsingEncoding:documentAttributes: run an event loop? (From: Jens Alfke <email@hidden>)
 >Re: Does initWithHTML:dataUsingEncoding:documentAttributes: run an event loop? (From: Andy Lee <email@hidden>)
 >Re: Does initWithHTML:dataUsingEncoding:documentAttributes: run an event loop? (From: Jens Alfke <email@hidden>)
 >Re: Does initWithHTML:dataUsingEncoding:documentAttributes: run an event loop? (From: Markus Spoettl <email@hidden>)
 >Re: Does initWithHTML:dataUsingEncoding:documentAttributes: run an event loop? (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Can scroll direction be changed programmatically?
  • Next by Date: Re: Can scroll direction be changed programmatically?
  • Previous by thread: Re: Does initWithHTML:dataUsingEncoding:documentAttributes: run an event loop?
  • Next by thread: Does initWithHTML:dataUsingEncoding:documentAttributes: run an event loop?
  • Index(es):
    • Date
    • Thread