katmai539 62 Junior Poster in Training

Hi there, I'll be dropping in quick:

I'm trying to pull four <t> nodes from a XML file, eg.

<?xml version="1.0" encoding="UTF-8"?>

<tasks tid="TERMINAL012345">
	<t>
		<reqs>keuringen/bammens3h.xml</reqs>
		<deadline>200120111600</deadline>
		<desc>WML keuring BAMMENS-3H</desc>
		<loc>Danzigerbocht 87 AMSTERDAM</loc>
		<ocode>TEST1234567890</ocode>
		<form>quiz</form>
		<sn>0000000001</sn>
	</t>
	<t>
		<reqs></reqs>
		<deadline>200120111630</deadline>
		<desc>Vulgraad meting</desc>
		<loc>Danzigerbocht 87 AMSTERDAM</loc>
		<ocode>TEST1234567890</ocode>
		<form>quiz</form>
		<sn>0000000002</sn>
	</t>
	<t>
		<reqs>keuringen/bammens3h.xml</reqs>
		<deadline>200120111645</deadline>
		<desc>WML keuring BAMMENS-3H</desc>
		<loc>Papierweg 12 AMSTERDAM</loc>
		<ocode>TEST1234567891</ocode>
		<form>quiz</form>
		<sn>0000000003</sn>
	</t>
	<t>
		<reqs></reqs>
		<deadline>200120111730</deadline>
		<desc>Inname container</desc>
		<loc>Accraweg 2 HAARLEMMERLIEDE</loc>
		<ocode>TEST1234560420</ocode>
		<form>quiz</form>
		<sn>0000000004</sn>
	</t>
</tasks>

I've separated them into four vb XmlNodes like

Dim Task1 As XmlNode = XmlTaskList.SelectSingleNode("//t[1]")
Dim Task2 As XmlNode = XmlTaskList.SelectSingleNode("//t[2]")
Dim Task3 As XmlNode = XmlTaskList.SelectSingleNode("//t[3]")
Dim Task4 As XmlNode = XmlTaskList.SelectSingleNode("//t[4]")

and want to display them into four textboxes like

TaskBox1.Text = Task1.SelectSingleNode("//desc").InnerXml & vbNewLine & Task1.SelectSingleNode("//loc").InnerXml
TaskBox2.Text = Task2.SelectSingleNode("//desc").InnerXml & vbNewLine & Task2.SelectSingleNode("//loc").InnerXml
TaskBox3.Text = Task3.SelectSingleNode("//desc").InnerXml & vbNewLine & Task3.SelectSingleNode("//loc").InnerXml
TaskBox4.Text = Task4.SelectSingleNode("//desc").InnerXml & vbNewLine & Task4.SelectSingleNode("//loc").InnerXml

The smelly part:

All four textboxes show the same first <t> node, although the debugger shows all the different InnerXmls. Could anyone explain to me what i'm doing wrong?
Thanks,

Me

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.