Share via


Read Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

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

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

Syntax

'Declaration
Public Overridable Function Read As Boolean
public virtual bool Read()
public:
virtual bool Read()
abstract Read : unit -> bool 
override Read : unit -> bool 
public function Read() : boolean

Return Value

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

Remarks

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

This method requires at least four bytes from the data stream in order to begin parsing. If fewer than four bytes are returned and there is no more data in the stream, the method will fail. If there is more data in the stream, the method will block parsing until receipt of the fourth byte.

.NET Framework Security

See Also

Reference

XmlReader Class

System.Xml Namespace