Hello.
I don't understand why any data should be partially parsed in line 8 or 9. Neither of these lines does any parsing as far as I can tell.
The documentation of QXmlStreamReader::readNextStartElement states:
bq. Returns true when a start element was reached. When the end element was reached, or when an error occurred, false is returned.
So I guess when you see a false return value and now Error you just read the end element.