Preview:
using System;
using System.Xml.Linq; // This namespace is required.
class Program
{
	static void Main( )
	{
		XDocument employeeDoc =	new XDocument(
		new XElement("Employees",
			new XElement("Employee",
				new XElement("Name", "Bob Smith"),
				new XElement("PhoneNumbers",
					new XElement("Home", "408-555-1000"))),
			new XElement("Employee",
				new XElement("Name", "Sally Jones"),
				new XElement("PhoneNumbers",
					new XElement("Home", "415-555-2000"),
					new XElement("Cell", "415-555-2001")))));
		Console.WriteLine(employeeDoc); // Displays the document
	}
}
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter