C# linq to xml - getting the Data

sappp

New Member
I have a project where I need to use the values of the nodes in an xml document to load the text of labels in a c# winform.I am thinking I need to load the xml data as objects into an array list , then call the child nodes of each element to fill what I need. Does this sound right? Can I get pointed in the right direction to start.here is the XML code\[code\]<Questions><Topic = 'Topic 1'><first = '100' answer = 'answer1'>Question 1.</first><second = '200' answer = 'answer2'>Question2</second><third= '300' answer = 'answer3'>Question3</third><fourth = '400' answer = 'answer4'>Question4</fourth><fifth = '500' answer = 'answer5'>Question5</fifth></Topic><Topic = 'Topic 2'><first = '100' answer = 'answer1'>Question 1.</first><second = '200' answer = 'answer2'>Question2</second><third= '300' answer = 'answer3'>Question3</third><fourth = '400' answer = 'answer4'>Question4</fourth><fifth = '500' answer = 'answer5'>Question5</fifth></Topic></Questions>\[/code\]I need to be able to fill a winform label or text box with any of the following: The Topic Name The value (100,200,300...) the answer (answer1) The Question(Question 1)
 
Back
Top