c# - how does XMLReader work -
If I use XMLReader.Create, and gives it a stream, then XMLReader lets me do any call Read the entire way to read the entire stream first, because the status of the stream varies to match the length of the property stream. Does XMLReader store entire XML in memory? It will look like I can call XmlReader. Read and the status of the stream never changes. Is XmlReader not possible to consume full stream?
XmlReader
does not read the whole stream at once, it only On the stream (or more if async is set to true), reads the block of 8192 bytes at once and stores them in internal byte buffer. Obviously, if your stream has less byte than that, then they will all be read on the
read ()
call. It's likely that you are experiencing.
Comments
Post a Comment