XmlSerializableServices.ReadNodes(XmlReader) Method

Definition

Reads a set of XML nodes from the specified reader and returns the result.

public:
 static cli::array <System::Xml::XmlNode ^> ^ ReadNodes(System::Xml::XmlReader ^ xmlReader);
public static System.Xml.XmlNode[] ReadNodes (System.Xml.XmlReader xmlReader);
static member ReadNodes : System.Xml.XmlReader -> System.Xml.XmlNode[]
Public Shared Function ReadNodes (xmlReader As XmlReader) As XmlNode()

Parameters

xmlReader
XmlReader

An XmlReader used for reading.

Returns

An array of type XmlNode.

Exceptions

The xmlReader argument is null.

While reading, a null node was encountered.

Remarks

This method reads all XML contained within the node the reader is positioned on when this call is made. This enables it to read and store all XML as an array of XmlNode objects. It is a helper method used by the types that implement IXmlSerializable and that use the ReadXml method.

Applies to