TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Anjan Kumar
NA
6
2.3k
Unable to read from XML file
May 1 2014 5:31 AM
Iam writing a code to read XML file and display it in DataGridView, but it doesn't work, my code is as follows...
give me suggestions
DataTable an = new DataTable();
XmlDocument xmldoc=new XmlDocument();
FileStream fsazm = new FileStream("D:\\data.xml", FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
xmldoc.Load(fsazm);
XmlNodeList xmlnode = xmldoc.GetElementsByTagName("Student");
for (int i = 0; i < xmlnode.Count; i++)
{
XmlAttributeCollection xattrc = xmlnode[i].Attributes;
an.Rows[i][0] = xattrc[0].Value;
an.Rows[i][1] = xattrc[1].Value;
}
Reply
Answers (
5
)
What is the Difference between ref and out keyword?
Run exe Visual studio 2012 on other computers