O'Reilly logo

Applied XML Programming for Microsoft® .NET by Dino Esposito

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 a Custom XML Writer

As we’ve seen, an XML writer is a .NET Framework class that specializes in writing out XML text. Because there is just one flavor of XML, the need for customized versions of XmlTextWriter is extremely low. However, a lot of documents and objects out there might take significant advantage of an ad hoc, specialized, and seamless XML serialization class.

In the .NET Framework, all the XML files being used—from ADO.NET Diff­Gram objects to Web .config files—are written using XML writers. (ADO.NET DataSet objects are always remoted and serialized in a special XML format called the DiffGram; see Chapter 10.) In addition, the XML serializer saves and restores .NET Framework objects to and from XML documents. (I’ll cover ...

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