XmlTextReader.GetRemainder Method ()


Gets the remainder of the buffered XML.

Namespace:   System.Xml
Assembly:  System.Xml (in System.Xml.dll)

member GetRemainder : unit -> TextReader

Return Value

Type: System.IO.TextReader

A TextReader containing the remainder of the buffered XML.


Starting with the .NET Framework 2.0, we recommend that you create XmlReader instances by using the XmlReader.Create method to take advantage of new functionality.

Because XmlTextReader does a buffered Read, it must be able to return the remainder of the unused buffer so that no data is lost. This allows protocols (such as multi-part MIME) to package XML in the same stream as other things.

After calling this method, EOF is set to true.

The following example reads the first part of an XML document and then uses GetRemainder to complete reading the document using a second reader.

No code example is currently available or this language may not be supported.

The example uses the input file tworeads.xml.

<?xml version="1.0" ?>
  <title>Pride And Prejudice</title>
  <author>Jane Austen</author>
  <title>The Handmaid's Tale</title>
  <author>Margaret Atwood</author>

.NET Framework
Available since 1.1
Return to top