XPathDocument Constructor (Stream)

Initializes a new instance of the XPathDocument class from the XML data in the specified Stream object.

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

public XPathDocument(
	Stream stream
)

Parameters

stream
Type: System.IO.Stream

The Stream object that contains the XML data.

ExceptionCondition
XmlException

An error was encountered in the XML data. The XPathDocument remains empty.

ArgumentNullException

The Stream object passed as a parameter is null.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft