Reputation: 113
I want to add xml declaration like
?xml version="1.0" encoding="UTF-8" standalone="no"?
this text in my xml. How to do it with vb.net ? any idea?
Upvotes: 1
Views: 4022
Reputation: 35270
Dim xmlDoc As New XmlDocument()
xmlDoc.AppendChild(.CreateXmlDeclaration("1.0", "utf-8", Nothing))
Refer to MSDN for more information: http://msdn.microsoft.com/en-us/library/system.xml.xmldocument.createxmldeclaration.aspx
Upvotes: 3