XDocument.Parse creates a new XDocument from a string.
Imports System
Imports System.Xml
Imports System.Xml.XPath
Public Class MainClass
Public Shared Sub Main()
Dim str As String = _
"<?xml version= '1.0'?>" & _
"<!-- comment at the root level -->" & _
"<Root>" & _
" <Child>Content</Child>" & _
"</Root>"
Dim doc As XDocument = XDocument.Parse(str)
Console.WriteLine(doc)
End Sub
End Class