Next node in xml with same element name

SilentHill

New Member
I've been working on this problem for a few hours now and I have searched all around with no luck for a solution :( What I am trying to do is print out names of the nodes, what i have is the amount of nodes that exist so I know how many times to loop but am having the hardest of times retrieving the valuesWhat I have tried:\[code\]int num = Convert.ToInt32(queuecount);var jobs = QueueXML.SelectSingleNode(xpathjobsfilename).InnerText;PreviousQueue = jobs.ToString();//foreach(loop < num)//{// if (CurrentQueue == PreviousQueue)// {// }// else// {// resultsListView.Items.Clear();// resultsListView.Items.Add(jobs[num]);// }// loop++;//}foreach (char JobName in jobs.ToString()){ if (CurrentQueue == PreviousQueue) { } else { resultsListView.Items.Clear(); resultsListView.Items.Add(jobs[num]); }} \[/code\]Edit: Example XML\[code\] <jobs> <job> <timeleft>0:00:00</timeleft> <mb>1419.60536003</mb> <msgid></msgid> <filename>Extended_Final</filename> <mbleft>1274.33209419</mbleft> <id>nzo_i7qxxq</id> </job> <job> <timeleft>0:00:00</timeleft> <mb>9.22459220886</mb> <msgid></msgid> <filename>Video2</filename> <mbleft>9.22459220886</mbleft> <id>2m3dv5</id> </job> </jobs>\[/code\]I want to retrieve the job details for each individual jobs
 
Back
Top