Home
Manage Your Code
Snippet: XML Document (C#)
Title: XML Document Language: C#
Description: Adding a xml declartaion to and creating a XMLDom Views: 157
Author: Danesha Marasinghe Date Added: 9/3/2007
Copy Code  
1XmlDocument xDoc = new XmlDocument();
2
3xDoc.LoadXml(xBookingResp.OuterXml.ToString());
4XmlNode xNode =xDoc.CreateXmlDeclaration("1.0", "utf-8", null);
5xDoc.InsertBefore(xNode, xDoc.DocumentElement);