Multiple choice .net vb

Which method of the XMLdocument class takes xml as string while loading

  1. Loadxml ( )

  2. Load( )

  3. Save ( )

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The LoadXml() method of XmlDocument accepts XML as a string parameter and loads it into the document. In contrast, the Load() method typically loads XML from a file path, stream, or reader. Save() is for writing, not loading.

AI explanation

In the .NET XmlDocument class, LoadXml(string xml) parses XML content supplied directly as an in-memory string. In contrast, Load() reads XML from a file path, stream, TextReader, or URL rather than a raw string, and Save() writes the document back out to a file/stream — it doesn't load anything. Since the question specifically asks about loading XML 'as a string', LoadXml() is the correct method.