Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Const xmlns As String = "http://www.atmarkit.co.jp/xmlns/sample/person" Dim document As New XmlDocument() document.Load("c:\sample.xml") Dim rootElement As XmlElement = document.DocumentElement Dim id As String = rootElement.GetAttribute("id") Trace.WriteLine(id) Dim comment1 As XmlComment = rootElement.FirstChild If Not comment1 Is Nothing Then Trace.WriteLine(comment1.Value) Dim nameElement As XmlElement = comment1.NextSibling If Not nameElement Is Nothing Then Dim nameText As XmlText = nameElement.FirstChild If Not nameText Is Nothing Then Trace.WriteLine(nameText.Value) End If End If End If Dim comment2 As XmlComment = rootElement.ChildNodes.Item(2) If Not comment2 Is Nothing Then Trace.WriteLine(comment2.Value) End If Dim ageList As XmlNodeList = rootElement.GetElementsByTagName("age", xmlns) If ageList.Count > 0 Then Dim ageElement As XmlElement = ageList.Item(0) Trace.WriteLine(ageElement.InnerText) End If Dim addressList As XmlNodeList = rootElement.GetElementsByTagName("address", xmlns) If addressList.Count > 0 Then Dim addressElement As XmlElement = addressList.Item(0) Trace.WriteLine(addressElement.InnerXml) End If End Sub