http://msdn.microsoft.com/en-us/library/58a18dwa.aspx
It's an web application. It doesn't have to be.
It prints out Hello There. but what it really does is making an xml file.
We call a stored procedure. And change it to dataset ds. And the dataset is changed to XML string. Then it is written to a file.
Result file looks like this.
Note that null value doesn't make XML attribute, but when there is data, the attribute is created.
Now we develop this program a bit more.
(1) We want to save XML result to a string. (http://stackoverflow.com/questions/8384014/convert-dataset-to-xml)
(2) Then we want to select the first element from the XML string.
Result looks like this.