This documentation is archived and is not being maintained.

XmlReader.Read Method

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

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

Return Value

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


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


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


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


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