System.Xml.XmlDocument.Load Method

Loads the XML document from the specified stream.

Syntax

public virtual void Load (System.IO.Stream inStream)

Parameters

inStream
The stream containing the XML document to load.

Remarks

Note:

The Load method always preserves significant white space. The XmlDocument.PreserveWhitespace property determines whether or not insignificant white space, that is white space in element content, is preserved. The default is false; white space in element content is not preserved.

If you want validation to occur, you can create a validating System.Xml.XmlReader instance by using the System.Xml.XmlReaderSettings class and the erload:System.Xml.XmlReader.Create method. For more information, see Validating XML Data with XmlReader.

This method is a Microsoft extension to the Document Object Model (DOM).

Requirements

Namespace: System.Xml
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0