Option Explicit
Option Strict
Imports System
Imports System.Xml
Imports Microsoft.VisualBasic
Public Class Sample
Public Shared Sub Main()
Dim doc As New XmlDocument()
doc.LoadXml("<author xml:space='preserve'>" & _
"<first-name>A</first-name>" & _
"<last-name>B</last-name>" & _
"</author>")
Console.WriteLine(doc.DocumentElement.InnerText)
Dim currNode as XmlNode = doc.DocumentElement
Dim sigws As XmlSignificantWhitespace = doc.CreateSignificantWhitespace(ControlChars.Tab)
currNode.InsertAfter(sigws, currNode.FirstChild)
Console.WriteLine(doc.DocumentElement.InnerText)
End Sub
End Class