Re: Using WebKit to display data that's not in HTML
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