XmlSerializableServices::ReadNodes Method (XmlReader^)

 

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

Namespace:   System.Runtime.Serialization
Assembly:  System.Runtime.Serialization (in System.Runtime.Serialization.dll)

public:
static array<XmlNode^>^ ReadNodes(
	XmlReader^ xmlReader
)

Parameters

xmlReader
Type: System.Xml::XmlReader^

An XmlReader used for reading.

Return Value

Type: array<System.Xml::XmlNode^>^

An array of type XmlNode.

Exception Condition
ArgumentNullException

The xmlReader argument is null.

SerializationException

While reading, a null node was encountered.

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.

.NET Framework
Available since 3.0
Return to top
Show: