|
top
|
 Subject: How database to XML mapper can help me ? Author: Ivan Pedruzzi Date: 18 May 2005 03:24 AM
|
Hi Antoines,
One way to let your users define an XML represenations for tables/views is SQLXML.
SQLXML has an intuitive syntax to bing the XML data model to table/columns
The following example shows one of the possible XML view for the Authors table
SELECT
XMLELEMENT(name "authors",
XMLELEMENT(name "au_id",t.au_id),
XMLELEMENT(name "au_lname",t.au_lname),
XMLELEMENT(name "au_fname",t.au_fname),
XMLELEMENT(name "phone",t.phone),
XMLELEMENT(name "address",t.address),
XMLELEMENT(name "city",t.city),
XMLELEMENT(name "state",t.state),
XMLELEMENT(name "zip",t.zip),
XMLELEMENT(name "contract",t.contract)
)
FROM pubs.dbo.authors t
Hope this helps
Ivan Pedruzzi
Stylus Studio Team
|
|
|