开发者

XMLLite parser hangs

开发者 https://www.devze.com 2022-12-13 12:37 出处:网络
I\'m parsing an XML using XMLLite. I notice that when its a relatively large file, the reader\'s pointers fails to locate the next element(tag) of the file. When i reduced the contents of the file, it

I'm parsing an XML using XMLLite. I notice that when its a relatively large file, the reader's pointers fails to locate the next element(tag) of the file. When i reduced the contents of the file, it could successfully parse.

The reader continually shows node type "XmlNodeType_None" and fails to complete parsing, getting stuck in an infinite while loop.

Is it to do something with its file size? O开发者_如何学JAVAr anything in initializing the IStream? My file has around 9000 bytes of data only.

Thanks


Do not use the SUCCEEDED macro to check if you should continue processing the value returned by IXmlReader::Read. Instead, check that the return value of IXmlReader::Read is equal to S_OK for the condition of your loop.

0

精彩评论

暂无评论...
验证码 换一张
取 消