XML ASP.Net

<%@ Page Language="C#" %>
<%@ Import Namespace="System.Xml" %>
<%@ Import Namespace="System.IO" %>

    void Page_Load(object sender, EventArgs e)
    {    
        XmlDocument empDoc = new XmlDocument();        
        try
        {
            StringWriter writer = new StringWriter();            
            //Load the XML from a String
            empDoc.LoadXml("" +
                        "" +    
                        "first name" + 
                        "last name" +                       
                        "city" +
                        "state99999" +
            "
");    
            //Save the XML data onto a file                    
            empDoc.Save(writer);
            txtResult.Text = writer.ToString();
            Response.Write(writer.ToString());
        }
        catch (XmlException xmlEx)
        {
            Response.Write("XmlException: " + xmlEx.Message);
        }
        catch (Exception ex)
        {
            Response.Write("Exception: " + ex.Message);
        }        
    }   



    Saving an XML Document to a StringWriter Object