0 Replies - 948 Views - Last Post: 27 September 2008 - 08:12 AM Rate Topic: -----

#1 Hanzie   User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 128
  • Joined: 19-August 07

query linq to xml

Post icon  Posted 27 September 2008 - 08:12 AM

Hello, I wan't to query an xml-file with the folowing code:

Dim Xprojectdir As XDocument
		Xprojectdir = Xdocument.Load("C:\Documents and settings\Hanzie\My Documents\Projectdirectorys.xml")

Dim Dir = From Project In Xprojectdir...<Project> _
				  Where Project.<Werknummer>.Value.ToString.Contains("E0593")

		For Each Project In Dir
			Me.TextBox1.Text = Dir.ToString
		Next



But i get the folowing error:

Error 2 Name 'Project' is not declared.

Why, i see the sample on multiple microsoft-sites.

Please help.

Is This A Good Question/Topic? 0
  • +

Page 1 of 1