Reading XML is only one part of handling XML in C#. Once you have an XML document loaded, there are times you need to make modifications, especially if you plan to write the XML back to file. The following steps take you through the process of modifying XML with both XmlDocument as well as XDocument. We will continue to use the library XML in this chapter and will also assume that all the XML has been loaded into an instantiated XmlDocument or XDocumentnamed document. As a reminder, following is the library XML:
<?xml version="1.0"?>
<library>
<books>
<book checkedout="no">
<title>To ...