NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

XmlReader.ReadDocument

Reads an XML document from this reader.

[Visual Basic]
Public Function ReadDocument() As XmlDocument
[C#]
public XmlDocument ReadDocument();
[C++]
public: XmlDocument* ReadDocument();
[JScript]
public function ReadDocument() : XmlDocument;

Return Value

An XmlDocument instance.

Exceptions

Exception Type Condition
XmlException If incorrect XML is encountered in the input stream.

Remarks

This method is typically invoked immediately after the reader has been created (i.e. when the reader is positioned on the first node in the input stream). The method creates a new XmlDocument instance and repeatedly calls ReadNode until an end tag or the end of the input stream is reached. As the nodes are read, they are added to the document's child node list.

See Also

XmlReader Class | XmlReader Members | System.Xml Namespace | ReadNode