O'Reilly logo

Windows Application Development Cookbook by Marcin Jamro

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

Writing an XML file

The application could use files with various types of content, such as plain text, as presented in the previous recipe. However, you can also use XML for formatting the content, especially when it should be structured. While developing UWP applications, you can use a set of classes to create an XML content, such as XmlWriter, XDocument, or XElement. Then, you can save the XML-formatted content to a file. In this recipe, you will learn how to do it.

As an example, you will create an application for adding data of important events. For each event, both the date and description will be set. The solution will save the data of all the entered events into an XML file. The design of the page is shown as follows:

Getting ready

To step ...

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