O'Reilly logo

Visual Basic® .NET by Example by Bob Donald, Gabriel Oancea

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Loading the XML Document

Dealing with XML starts with the System.Xml.XmlDocument class. This class supports loading, manipulating, and saving XML data.

NOTE

In the last chapter you learned about the System.Xml.XmlDataDocument in regards to synchronizing data between XML and a DataSet. The XmlDataDocument class is a subclass of XmlDocument. Therefore, everything discussed in this chapter and the next chapter also applies to XmlDataDocument.

Loading XML in your code is performed by calling the Load or LoadXml methods on an XmlDocument object. The Load method reads data using a filename or an XmlReader object. The LoadXml method is used to load an XmlDocument by directly passing in a string that contains XML.

Here is an example XML document, named ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required