Hi again, I am trying to read an XML file in this format;

<?xml version="1.0" encoding="utf-8"?>
<word id="Apple" def="A fruit" />
<word id="Dinosaurs" def="Now Extinct Animal" />
<word id="Giant Panda" def="An Endangered Animal" />
<word id="Asia" def="The Largest Continent" />

I have more than 3000 lines like this. And I want to read the XML file in to two listboxes, Listbox1 will contain the 'id' word and Listbox2 will contain the 'def' word(s) and I have absolutely no idea how to do this, So how am i to do this please?

this might give you an idea

Imports System.Xml.Linq

		Dim xmlFile As XDocument = XDocument.Load("C:\Users\GeekByChoiCe\Desktop\test.xml")
		Dim _content As IEnumerable(Of XElement) = xmlFile.Root.Elements("word")
		ListBox1.DataSource= (From g In _content Select g.@id).ToList
		ListBox2.DataSource= (From g In _content Select g.@def).ToList
This question has already been answered. Start a new discussion instead.