Emit DataSet content in xml to web page

요즘 YUI로 작업을 하고 있는데, 많은 데이터들이 xml로 필요하다. 그래서 간단하게 만들었지롱.

            DataSet job = this.Customer.GetJobs(PageUtility.ParseQueryStringInt("CustomerId"));
            job.DataSetName = "ResultSet";
            job.Namespace = "xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"urn:yahoo:lcl\"";

            if (job.Tables.Count > 0)
                job.Tables[0].TableName = "Result";

            Response.ContentType = "text/xml";
            Response.Write(job.GetXml());

Emit DataSet content in xml to web page

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s