I am simply trying to load a dataset and output it on a webpage as XML with the schema being written as well. I have been researching to find a way to achieve this without any luck.

The code I am using is:

```
string str =
     "SELECT Name,Members,MaxLvl,Faction,Government,Score FROM dim5orgs where faction =
    'Omni' order by Score DESC";

// Connection string for a typical local MySQL installation
string cnnString = "Server=xxxxxxxnet;Port=3306;Database=xxx;Uid=xxxxx;Pwd=xxxx";

// Create a connection object and data adapter
MySqlConnection cnx = new MySqlConnection(cnnString);
MySqlDataAdapter adapter = new MySqlDataAdapter();

// Create a SQL command object
string cmdText = str;

MySqlCommand cmd = new MySqlCommand(cmdText, cnx);

// Create a fill a Dataset
DataSet ds = new DataSet();
adapter.SelectCommand = cmd;
adapter.Fill(ds);

StringWriter sw = new StringWriter();
ds.WriteXml(sw,XmlWriteMode.WriteSchema);
string result = sw.ToString();

Response.Write(result);

```

Right now I am getting output like:

```
Punk732220OmniRepublic1644786805740

Paradise754220OmniDepartment1633903815782

```

I would like the output to be in proper XML form somehow using the column names in the dataset. 

Like:

```
<data>
    <name>Punk</name>
    <members>732</members>
    <Maxlvl>220</MaxLvl>...etc 
</data>

```

I would like to be in proper XML form, with the XML headers written properly.

Thank you.