O'Reilly logo

C# and XML Primer by Jonathan Hartwell

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

© Jonathan Hartwell 2017

Jonathan Hartwell, C# and XML Primer, 10.1007/978-1-4842-2595-0_3

3. Modifying XML

Jonathan Hartwell

(1)Joliet, Illinois, USA

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 ...

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