Re: XML and WebView
Re: XML and WebView
- Subject: Re: XML and WebView
- From: Justin Anderson <email@hidden>
- Date: Fri, 15 Sep 2006 22:25:20 -0400
That's a great case for XSL. Starting with Safari 1.3 (and so any
WebKit 10.3.9 or newer) you can do the transformation at page load
with a processing instruction à la http://developer.apple.com/
internet/safari/faq.html#anchor21 The example there is:
<?xml version="1.0" ?>
<?xml-stylesheet type="text/xsl" href="your_transform_file_here.xsl" ?>
If you want to do fancier things like include XSL parameters, you'll
probably have to do the transform in Cocoa with NSXMLDocument's -
objectByApplyingXSLT:arguments:error:
Justin Anderson
On Sep 15, 2006, at 9:41 PM, Rick Langschultz wrote:
Can I subclass WebView to interpret custom XML data. I don't want
to use HTML input but custom XML. Or should I just use an xslt
engine to interpret my XML data into HTML code through a webview. I
am trying to create something that will interpret code like:
<button name= "hello" send="helloworld" text="Hello World"
enabled="true"/>
This code would create a button on a page with the text "Hello
World" inside of it, upon submitting or clicking on the button the
key value pair submitted to the server would be { hello: helloworld}
Should I just use XSLT or do I have to modify the WebView code to
do this for me???
_______________________________________________
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