[Interest] About qxmlstream

Till Oliver Knoll till.oliver.knoll at gmail.com
Thu Jul 19 19:01:47 CEST 2012


Am 19.07.2012 um 17:57 schrieb <song.7.liu at nokia.com>:

> Thanks, finally the DOM is used for this case, thanks ;)

What do you mean for "this case"?! And I assume you're referring to the (deprecated!) QDomDocument API.

Well, that *still* doesn't make your example valid XML (not even valid HTML): in case QDomDocument doesn't terribly throw up and spit out your input then either because its more error-forgiving than I thought, there's a bug which doesn't detect the garbage input you're feeding it with - or you are simply /ignoring/ the error it raises!

In any case, what would you expect would/should be the generated output? An empty DOM node named "title Hello" (not possible, refer again to the link I sent previously: whitespace is NOT part of a "tag name"!)?

Or a DOM node with an unnamed (!) attribute? Or a text DOM node with content "Hello"?! Not going to happen...


So better fix the input (and/or your code)!

Cheers,
  Oliver
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20120719/63a06f00/attachment.html>


More information about the Interest mailing list