MSSQL Output in XML using For XML « Naveen’s Weblog.
http://technet.microsoft.com/en-us/library/ms345137(SQL.90).aspx#forxml2k5_topic8
1 2 3 |
<span style="color: #0000ff; font-size: small;">select</span><span style="font-size: small;"> FirstName</span><span style="color: #808080; font-size: small;">,</span><span style="font-size: small;">LastName </span><span style="color: #0000ff; font-size: small;">from</span><span style="font-size: small;"> Employee </span><span style="color: #0000ff; font-size: small;">for <span style="color: #0000ff; font-size: small;">xml <span style="color: #0000ff; font-size: small;">AUTO </span></span></span><span style="color: #808080; font-size: small;">, </span><span style="color: #0000ff; font-size: small;">elements</span> |