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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access