Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.5, 6.8, 6.9
-
None
-
8
-
Foundation Sprint 130
Description
Currently, QXmlStreamWriter continues to write data to the output device even after an error has been detected and hasError() returns true.
If invalid data is written (such as an invalid XML character), the writer correctly raises an encoding error, but still continues to write buffered data to the underlying device, resulting in malformed XML output. Current documentation states that writes may be ignored after an error, but in practice, data is still written.
Expected output of the reproducer:
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><root></root>"
Actual output:
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><root>Invalid character</root>\n"
Attachments
Gerrit Reviews
For Gerrit Dashboard: QTBUG-135861 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
643996,3 | QXmlStreamWriter: add option to stop writing after an error | dev | qt/qtbase | Status: NEW | 0 | 0 |