XML String into a DataGridView (C#)
Posted
by Justin Daniels
on Stack Overflow
See other posts from Stack Overflow
or by Justin Daniels
Published on 2010-04-13T22:06:57Z
Indexed on
2010/04/13
22:43 UTC
Read the original article
Hit count: 451
I am currently working with a webservice to pull a report about users in a remote support system.
After pulling my report and receiving the result, I am given the following string back by the method:
<report><header><field id="0">Source</field><field id="1">Session ID</field><field id="2">Date</field><field id="3">Name</field><field id="24">Technician Name</field><field id="25">Technician ID</field></header><data><row><field id="0">Email</field><field id="1">55037806</field><field id="2">4/13/2010 2:28:06 AM</field><field id="3">Bill Gates</field><field id="24">John</field><field id="25">1821852</field></row><row><field id="0">Telephone</field><field id="1">55034548</field><field id="2">4/13/2010 12:59:44 AM</field><field id="3">Steve Jobs</field><field id="24">John</field><field id="25">1821852</field></row></data></report>
After receiving this string, I need to take it and display the actual data in a datagridview. I've tried putting it into an XMLDocument then reading that, but it seems to keep failing. Just interested in another set of eyes :) Application is written in C# in VS2010.
© Stack Overflow or respective owner