• 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: WebKit and XSLT
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >WebKit and XSLT (From: Kiel Gillard <email@hidden>)

  • Prev by Date: Re: Resizing a WebView
  • Next by Date: Re: Creating a subclass of an *unknown* object
  • Previous by thread: WebKit and XSLT
  • Next by thread: viewing schemas in Syncrospector
  • Index(es):
    • Date
    • Thread