[Interest] QXmlStreamReader and qDebug()

Alexander Syvak alexander.svk at gmail.com
Sat Jul 27 00:04:36 CEST 2013


Here're 2 code snippets with different outputs:
#1

qDebug() << pxml->start_element() << pxml->name();

qDebug() << pxml->read_element_text();

#2

qDebug() << pxml->start_element() << pxml->name() << pxml->read_element_text();


pxml is a pointer to the class incapsulating the QXmlSteamReader object.

start_element() => isStartElement()

name() => name().toString()

read_element_text() => readElementText()


The first snippet yields

true "NAME"

"CONTENT"

The second snippet yields

false NAME ""


Why?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130727/f275e387/attachment.html>


More information about the Interest mailing list