© Jonathan Hartwell 2017

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

2. Reading XML

Jonathan Hartwell

(1)Joliet, Illinois, USA

Reading XML is the cornerstone of handling XML in any application. If your application is unable to read XML, then you won’t be able to do much. There are several ways to read XML, and this chapter will give you an insight into what methods are available to you.

Using XmlDocument

The XmlDocument class was the first way to handle reading and writing XML using the .NET Framework with C# and is included in the System.Xml namespace. With XmlDocument you can not only read XML but also manipulate and write XML, which will be covered in later chapters.

To start we will need to have an XML document to demostrate ...

Get C# and XML Primer now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.