System.Xml.XmlReader.Create Method

Creates a new System.Xml.XmlReader instance using the specified stream.

Syntax

public static XmlReader Create (System.IO.Stream input)

Parameters

input
The stream containing the XML data.

Returns

An System.Xml.XmlReader object used to read the data contained in the stream.

Remarks

An System.Xml.XmlReaderSettings object with default settings is used to create the reader. If you wish to specify the features to support on the created reader, use the overload that takes an System.Xml.XmlReaderSettings object as one of its arguments, and pass in an System.Xml.XmlReaderSettings object with the correct settings.

A default System.Xml.XmlUrlResolver with no credentials is used to access any external resources such as a document type definition (DTD), entities, schemas, and so on. If the external resource is located on a network resource that requires authentication, specify an System.Xml.XmlResolver with the necessary credentials using the XmlReaderSettings.XmlResolver property.

The created System.Xml.XmlReader object expands entity references and performs XML normalization of new line characters.

Requirements

Namespace: System.Xml
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0