Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
Previous Versions
.NET Framework 1.1
.NET Framework
Reference
System.Xml
XmlReader Class
Methods
 Read Method
This page is specific to
Microsoft Visual Studio 2003/.NET Framework 1.1

Other versions are also available for the following:
.NET Framework Class Library
XmlReader.Read Method

When overridden in a derived class, reads the next node from the stream.

[Visual Basic]
Public MustOverride Function Read() As Boolean
[C#]
public abstract bool Read();
[C++]
public: virtual bool Read() = 0;
[JScript]
public abstract function Read() : Boolean;

Return Value

true if the next node was read successfully; false if there are no more nodes to read.

Exceptions

Exception Type Condition
XmlException An error occurred while parsing the XML.

Remarks

When an XmlReader is first created and initialized, there is no information available. You must call Read to read the first node.

Example

See Read (in the XmlTextReader class) for an example using this method.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard

See Also

XmlReader Class | XmlReader Members | System.Xml Namespace

© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker