[Qt-interest] How to: parse an xml file with tags
Alan Ezust
alan.ezust at gmail.com
Fri Apr 15 03:08:44 CEST 2011
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?
More information about the Qt-interest-old
mailing list