Option Explicit
Option Strict
Imports System
Imports System.IO
Imports System.Xml
Public Class Sample
Public Shared Sub Main()
'Create the XmlDocument.
Dim doc As New XmlDocument()
doc.LoadXml("<book genre='Computer' ISBN='1-111111-57-5'>" & _
"<title>C#</title>" & _
"</book>")
Dim shallow As XmlDocument = CType(doc.CloneNode(False), XmlDocument)
Console.WriteLine(shallow.Name + shallow.OuterXml)
Console.WriteLine(shallow.ChildNodes.Count)
End Sub
End Class