all groups > dotnet xml > june 2004 >
You're in the

dotnet xml

group:

Datset mapping to element/attribute


Re: Datset mapping to element/attribute Dino Chiesa [Microsoft]
6/2/2004 4:01:30 PM
dotnet xml:
You have to do the mapping yourself between the db schema and the XSD
provided to you.

There is a nifty capability in SQL Server 2000 to help you here, but still
it is not automatic. It cannot magically map between the two disparate
schema. Also it works with SQL Server only of course. Other DB's may have
similar capabilities, I don't know.

See here
http://www.extremeexperts.com/ExpertChat/sql/xmlcapabilities.aspx
http://www.samspublishing.com/articles/article.asp?p=99813

-Dino


[quoted text, click to view]

Datset mapping to element/attribute mid
6/28/2004 2:31:50 PM
Hello!


First please understand tha my xml knowledge is very very short. I'm new at
xml world.

I need to understand how do I map a given sqlColumn to a xml element or
attribute.
I was given a XSD that has a certain number of elements and attibutes. This
XSD was provided by another company so that my company can create a xml
file filled with data that comes from my database.

In order to acomplish this I think I will have to query my database and
stream the results to the xml file that will be validated by the XSD. Am I
correct? But my collumn names that are in the tables inside my dataset are
different of those specified in the XSD.

How can I dinamically create the correct xml element/node with the correct
name as specified in the XSD?

What is the correct path / logic to this goal?

Please point me to the correct way

I am using vb.net,vs2003
TIA
mid
AddThis Social Bookmark Button