.NET and XML
.NET and XML Contents
Summary How to add the XML Declaration with XmlTextWriter and WriteStartDocument?
If you have read some of the previous XmlTextWriter examples then you have surely recognized that all created XML files doesn't contain any XML declaration. In this small example you will see how you can add the xml declaration.
The key to add the xml declaration is to use the WriteStartDocument() method. This method will automatically add the declaration to the xml file. Here is some code which does that.
Partners
Dream.In.Code dotNet Slackers dotNet Spider Your HTML Source VisualBuilder.com DevGuru Planet Source Code ZVON.ORG Web Design ASPAlliance XML Pitstop Scripts
The Spot 4 SAP Bitshop Web Hosting