WROX.COM CODE DOWNLOADS FOR THIS CHAPTER
The wrox.com code downloads for this chapter are found on this book’s webpage on Wrox.com on the Download Code tab. The code can also be found at
http://github.com/benperk/BeginningCSharp7. The code is in the Chapter21 folder and individually named according to the names throughout the chapter.
Just as programming languages like C# describe computer logic in a format that is readable by both machines and humans, XML and JSON are both data languages, which are used storing data in a simple text format that can be read by both humans and nearly any computer.
Most C# .NET applications use XML in some form for storing data, such as .config files for storing configuration details and XAML files used in WPF and Windows Store applications. Because of this important fact, we’ll spend the most time in this chapter on XML, with just a short look at JSON on the side.
During this chapter you will learn the basics of XML and JSON and then learn how to create XML documents and schemas. You will learn the basics of the XmlDocument class, how to read and write XML, how to insert and delete nodes, how to convert XML to JSON format, and finally how to search for data in XML documents using XPath.