Export (0) Print
Expand All

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

Show:
© 2014 Microsoft