Is there any way to have an XDocument print the xml version when using the ToString method? Have it output something like this:
VB.NET Solution CODE
Code
Dim _root As XElement =
Dim _element1 As XElement = i am element one
Dim _element2 As XElement = i am element one
_root.Add(_element1)
_root.Add(_element2)
Dim _document As New XDocument(New XDeclaration("1.0", "UTF-8", "yes"), _root)
_document.Save("c:\xmlfolder\root.xml")
Output Note(please open output in notepad )
i am element one
i am element one