[Qt-interest] How to: parse an xml file with tags

Scott Aron Bloom Scott.Bloom at onshorecs.com
Fri Apr 15 03:15:34 CEST 2011


Use QNetworkAccessManager to download it...

Then use QXmlStreamReader to read it...

-----Original Message-----
From: qt-interest-bounces+scott.bloom=onshorecs.com at qt.nokia.com
[mailto:qt-interest-bounces+scott.bloom=onshorecs.com at qt.nokia.com] On
Behalf Of Alan Ezust
Sent: Thursday, April 14, 2011 6:09 PM
To: Ross Driedger
Cc: qt-interest at trolltech.com
Subject: Re: [Qt-interest] How to: parse an xml file with tags

On Tue, Feb 16, 2010 at 3:09 PM, Ross Driedger <ross at earz.ca> wrote:
>
> On 16-Feb-10, at 4:53 PM, qt-interest-request at trolltech.com wrote:
>
> Another good example is also DOM: lots of people asked for DOM for 
> WebKit after Qt 4.4. We stood our ground and didn't add the hundreds 
> of classes that would be required for full DOM API. Instead, we made 
> QWebElement, which still allows you to do what you want to do (access 
> the object tree inside the HTML
> world) but without introducing an "alien" API.
>
> To me that sounds like a reasonable and workable compromise to a 
> difficult problem.
> [...]
>

I was wondering, is QWebElement meant to parse XML documents properly?
Because I tried loading into a QWebPage  a URL that returns XML instead
of HTML (a podcast rss feed) and thought I could use the WebKit class to
load and parse the XML.

The document structure seems to be there, but whenever I call
"toPlainText()" on any of those QWebElements, I get an empty string. Is
that a webkit bug?
_______________________________________________
Qt-interest mailing list
Qt-interest at qt.nokia.com
http://lists.qt.nokia.com/mailman/listinfo/qt-interest



More information about the Qt-interest-old mailing list