0

I have a process that is writing an XML file. I am writing an application that wants to parse the XML that is being written. The constraint here is that I want to parse the XML as it is being written. The XML is not written entirely all at once, and will be written gradually. How can I accomplish this using Qt?

4

1 回答 1

1

您可以使用QXmlStreamReader完成此操作。如果在您解析时数据用完,它将报告 a QXmlStreamReader::PrematureEndOfDocumentError,但如果发生这种情况,您应该能够等待更多数据。

建议的链接还包含有关增量解析的信息。

于 2012-10-16T08:55:15.330 回答