Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
XmlReader that supports reading a document from a stream with multiple documents
using System.IO;
using System.Xml;
internal class StreamedXmlReader : XmlTextReader
private bool eof;
public override bool EOF => base.EOF || eof;
public StreamedXmlReader(TextReader input) : base(input)
public override void ReadEndElement()
if (Depth == 0)
eof = true;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.