• 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: Using WebKit to display data that's not in HTML
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using WebKit to display data that's not in HTML


  • Subject: Re: Using WebKit to display data that's not in HTML
  • From: Justin Anderson <email@hidden>
  • Date: Mon, 18 Sep 2006 13:38:49 -0400

WebKit is for displaying HTML. If you want to display data that's not in HTML, format it into HTML and then pass it to WebKit.

You will probably want to use NSXMLDocument to build the HTML and then pass your NSXMLDocument's string value to your WebView with loadHTMLString:baseURL:.

Justin Anderson

On Sep 18, 2006, at 1:34 AM, Joe Goh wrote:

Hi everyone,

I'm trying to use a WebView to display some data that I have stored in
CoreData, as I would like to use CSS to style the output.

So far, my approach uses something like this,

[[[document documentElement] firstChild] setInnerHTML:@"<p>some string
from CoreData</p>"];

It seems like an awful hack however, and i'm inclined to try something
else, but I can't seem to find any documentation from how to do this
from the developer docs, as it all seems to be written for the
developer that uses WebKit for displaying HTML documents.

I'm totally lost on the direction I should take - should I be
subclassing WebDataSource?  Do I use createTextNode: ?

Any help appreciated!
Thanks!
Joe

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Using WebKit to display data that's not in HTML
      • From: "Joe Goh" <email@hidden>
References: 
 >Using WebKit to display data that's not in HTML (From: "Joe Goh" <email@hidden>)

  • Prev by Date: wrapping
  • Next by Date: Re: Mixing Chinese and Japanese text
  • Previous by thread: Re: Using WebKit to display data that's not in HTML
  • Next by thread: Re: Using WebKit to display data that's not in HTML
  • Index(es):
    • Date
    • Thread