-4
namespace readtask
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button2_Click(object sender, EventArgs e)
        {

            Process.Start(@"E:\SAMPLE PROJECTS\TaskName.xml");
        }
    }
}
Deepak Sharma
  • 4,124
  • 1
  • 14
  • 31

1 Answers1

0

There are one to many ways to achieve this:

using System;
using System.IO;
using System.Xml;

public class SampleXML
{
  public static void Main()
  {
    //Create the XmlDocument.
    XmlDocument doc = new XmlDocument();
    doc.Load("TaskName.xml");

    //Display the desired tag.
    XmlNodeList elemList = doc.GetElementsByTagName("name");
    for (int i=0; i < elemList.Count; i++)
    {   
      Console.WriteLine(elemList[i].InnerXml);
    }  

  }
}

or this?

or maybe this?

definitely look at this!

DirtyBit
  • 16,613
  • 4
  • 34
  • 55