Chapter 20: Reading and Writing XML

Download CD Content


In this chapter, you will learn how to:

  • Why XML is so important to Microsoft .NET

  • The classes that make up the .NET XML namespaces

  • How to parse XML files using XmlTextReader

  • How to validate XML using XmlValidatingReader

  • How to write XML using XmlTextWriter

  • How to use the XmlDocument class to manipulate XML in memory

This is the first of two chapters that introduce you to the XML capabilities of the Microsoft .NET Framework. XML plays a major role in .NET as an enabling technology, and the .NET Framework provides full support for just about everything you’ll need to do with XML.


This chapter assumes that you already know something about XML. You should be comfortable with elements, attributes, validation, namespaces, and all the other paraphernalia that surrounds XML.

There isn’t space to give you a grounding in XML and the XML technologies, so if you haven’t met XML before, you might want to consult a book such as XML Step by Step, Second Edition by Michael Young (Microsoft Press, 2002) before reading further.

Microsoft Visual C++  .NET(c) Step by Step
Microsoft Visual C++ .NET(c) Step by Step
ISBN: 735615675
Year: 2003
Pages: 208 © 2008-2017.
If you may any questions please contact us: