PDA

View Full Version : Can Qwebview load xml/xsl file?



richardander
10th January 2009, 12:08
Hi,

I am wondering if anyone ever load xml file ( not html ) in QWebview? Can the data in XML be shown correctly with teh style specified by xsl file?

thank you!

rustyhowell
12th November 2010, 21:20
I was able to do this with 4.6.2, but now with 4.7.1, I cannot. l When I set the QUrl to the xml/xslt file, nothing appears to happen. The signals are emitted for loadStarted(), loadProgress(), loadFinished(), urlChanged(), but nothing is displayed in the QWebView.

aslicedbanjo
25th August 2015, 23:10
I've been trying to do pretty much the same, using the example from this stackoverflow question:

http://stackoverflow.com/a/9530410

This is an XML file with an embedded XSLT. I've tried all sorts from setting attributes for on the page that webview has, to using QXmlQuery and setting HTML and I can't get it to work with an embedded XSLT. I do have an example working with separate XML and XSLT files. However, I'd prefer to use the embedded version since I have third-party application that produces such XML + XSLT files.

Is this confirmed as not working or not supported in Qt 4.8?

d_stranz
26th August 2015, 23:36
QWebView is not a full-blown web browser like Firefox, IE, Chrome, or whatever - it doesn't support XML / XSLT, only HTML and some JavaScript. The stackoverflow example was based on a standalone browser, not QWebView.