0
我需要解析大(> 3GB)的XML文件,并通过我,像这样的元素使用XmlTextReader的循环:VB.NET的XmlTextReader读取字节
oReader = New XmlTextReader(filename)
oReader.WhitespaceHandling = WhitespaceHandling.Significant
While oReader.Read()
' Processing in here
End While
由于这种预期需要很长的时间,我想提供一个进度指示器,表明迄今为止已处理了多少XML文件。我的计划是在处理之前获取XML文件的总文件大小,然后保留XmlTextReader处理的字节数,以便计算完成百分比。但是,我无法弄清楚如何获取XmlTextReader基础数据流缓冲的字节数。有没有办法做到这一点?