'document' is not declared. It may be inaccessible due to its protection level.
i found this, but firstchild doesnt seem to be in the system....
http://support.microsoft.com/kb/317169
can any one yell what im doing wrong?
Code:
Imports System.IO
Imports System.Xml
Public Class Form1
Public Sub Load_Click(sender As Object, e As EventArgs) Handles Start.Click
If (System.IO.File.Exists("C:\cldata.xml")) Then
Dim document As XmlReader = New XmlTextReader("C:\cldata.xml")
Dim type = document.NodeType
Else
MessageBox.Show("The filename you selected was not found.")
End If
End Sub
Public Sub ListView1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ListView1.SelectedIndexChanged
ListView1.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent)
Dim nodes As XmlNodeList = document.SelectNodes("clanners/exlie")
For Each node As XmlNode In nodes
Dim name As String = node.SelectSingleNode("name").InnerText
Dim clan As String = node.SelectSingleNode("clan").InnerText
Dim profession As String = node.SelectSingleNode("profession").InnerText
Dim population As String = node.SelectSingleNode("population").InnerText
For cnt As Integer = (population) To ListView1.Columns.Count
Next
ListView1.Items.Add(New ListViewItem(New String() {name(0), profession(1), clan(2)}))
Next
End Sub
Public Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim type = document.NodeType
If (document.Name = "news") Then
news.Visible = True
news.Text = document.ToString()
End If
If (document.Name = "population") Then
play.Visible = True
play.Text = document.ToString()
End If
End Sub
End Class
i found this, but firstchild doesnt seem to be in the system....
http://support.microsoft.com/kb/317169
can any one yell what im doing wrong?
Last edited:

