using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Xml.Linq;

namespace XML_LINQ
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void btnQuit_Click(object sender, EventArgs e)
        {
            // End the application.
            Close();
        }

        private void btnTest_Click(object sender, EventArgs e)
        {
            // Build the XML document.
            XDocument NewDoc = new XDocument(
                new XDeclaration("1.0", "utf-8", "yes"),
                new XElement("sample",
                    new XElement("data", "Hello"),
                    new XElement("data", "Goodbye")));

            // Display the result on screen.
            txtOutput.Text = NewDoc.Declaration + "\r\n" + NewDoc.ToString();
        }
    }
}
