Syntax :
[ FOR { BROWSE |
XML
{ {
RAW [ ( 'ElementName' ) ] | AUTO }
[
] [ , ELEMENTS [ XSINIL | ABSENT ] ]
| EXPLICIT
[
]
| PATH
[ ( 'ElementName' ) ]
[
[ , ELEMENTS [ XSINIL | ABSENT ] ]
]
}
Source: SQL Help Documentation
simple example :
select top 100 contactid, firstname, middlename, lastname
from Person.Contact
FOR XML AUTO, TYPE, XMLSCHEMA, ELEMENTS XSINIL
At .net application we only have to consume the xml result. How to do it, i will post it later because i still exploring it :D
No comments:
Post a Comment