Re: WebKit and XSLT
Re: WebKit and XSLT
- Subject: Re: WebKit and XSLT
- From: Tim Lucas <email@hidden>
- Date: Thu, 16 Jun 2005 03:15:33 +1000
On 16/06/2005, at 1:34 AM, Kiel Gillard wrote:
Hi all,
I have an instance of a WebView in my user interface that successfully
transforms some XML. However, I'd like to add a feature where the
transformation is saved as a HTML file, as opposed to the entire XML.
I was wondering how could I do this?
Have you tried:
NSString *result = [[[webView mainFrame] DOMDocument] documentElement]
outerHTML];
Otherwise try using the WebScriptObject w/ JS:
WebScriptObject *win = [webView windowScriptObject];
NSString *result = [win
evaluateWebScript:@"document.documentElement.outerHTML"]
I just tested the above by typing
"javascript:alert(document.documentElement.outerHTML)" into the url bar
on the below file in Safari 1.3.9 and it seemed to work fine:
http://www.w3schools.com/xsl/cdcatalog_with_xsl.xml
- tim lucas
_______________________________________________
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