How to Load XML Documents in ASP.NET 2.0
(Page 1 of 4 )
XML integration with the Microsoft .Net Framework 2.0 provides the XMLDocument class for working with XML. Loading an XML document, a task needed in many web applications, can be accomplished using several forms of the Load() method. The article introduces you to several of these load methods with concrete examples providing you with the background necessary to use these methods.
The next picture shows you the Object Browser showing the XMLDocument class in the System.XML namespace. The XMLDocument class inherits from the XMLNode class as in the following hierarchical relationship:
System.Object
System.Xml.XmlNode
System.Xml.XmlDocument

The XMLDocument class has a large number of Public/Private properties and methods shown in the picture, which are also from the object browser in the Visual Studio 2.0 IDE. This class can invoke its methods not only to load XML documents but also create XML documents with all the different element types you would find in an XML document. This article however will look only at loading the XML document. We will assume it exists as an xml file on the hard drive of the machine; or is available as a file that can be accessed as an URL; or that the content is available as a string.

Next: Loading an XMLDocument >>
More ASP.NET Code Articles
More By Jayaram Krishnaswamy