473,587 Members | 2,568 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Datset mapping to element/attribute

mid
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

Nov 12 '05 #1
2 2179
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/Expert...abilities.aspx
http://www.samspublishing.com/articl...le.asp?p=99813

-Dino
"mid" <mi*********@mi dbarnospam.org> wrote in message
news:6s******** ******@midbarno spam.org...
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

Nov 12 '05 #2
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/Expert...abilities.aspx
http://www.samspublishing.com/articl...le.asp?p=99813

-Dino
"mid" <mi*********@mi dbarnospam.org> wrote in message
news:6s******** ******@midbarno spam.org...
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

Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1486
by: Ingrid | last post by:
Am I right in thinking that datatyping at element level ie <xs:element name="num" type="xs:integer"> and specifying a choice of attribute values ie <xs:attribute name="kind"> <xs:simpleType> <xs:restriction base="xs:token"> <xs:enumeration value="volume_number"/> <xs:enumeration value="page_range"/>
4
2387
by: Gordon Dickens | last post by:
I have target xml to generate from schema. All of the XML instances have the same global element i.e. <base>. I would like to combine all of the schemas into a single schema where I could generate any of the specific instances. sample schema one: <?xml version="1.0" encoding="UTF-8"?> <xs:schema...
10
2037
by: mike | last post by:
regards: Where to find tag mapping-table of HTML translated to XHTML1.0 Any positive suggestion is welcome. thank you May goodness be with you all
1
4378
by: Lee Atkinson | last post by:
Hi What effect does the presence of minOccurs attribute with columns defining the tables for a dataset? I understand that, if it is set to minOccurs=0, then the element does not have to appear in XML using the XSD, but how does that effect the dataset? Does it allow a dataset to be filled with a DataAdapter that does not provide that...
0
1373
by: magister | last post by:
Hello, I want to have a unique Quesiton Id key for each question under section. Not for every question in the Typed DataSet. Is there anyway I can do this...? Thanks, here is my typed Dataset XSD <?xml version="1.0" encoding="utf-8" ?>
6
2575
by: Martin | last post by:
Hi, I have a xml file like the one below <?xml version="1.0" encoding="utf-8"?><e1 xmlns:e1="http://tempuri.org/Source1.xsd" e1:att1="1" e1:att2="2" e1:rest="345"/> If I try to create a schema for it with Visual Studio, I get the error "Failed to create a schema for this data file because:
1
1985
by: David Laub | last post by:
The following valid XSD schema can NOT be successfully read by the ReadXMLSchema method of the DataSet object - it errors out with a "NonEmptyString not defined" error. This schema is more complex than a plain vanilla schema, but doesn't strike me as obscenely complex. Are there general rules for what can an can not be mapped between any...
1
2038
by: yuri | last post by:
Hello, Is it possible to create a binding that would map an input message with a part defined as a complex-type element to a url-encoded string? For example, wsdl file defines a message as <wsdl:message name="MyRequestMsg"> <wsdl:part name="myData" element="req:myData"/> </wsdl:message>
2
18138
by: mlb5000 | last post by:
I seem to be having issues validating an XML document using my schema. Both are below: The Schema: <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="Receivers" > <xs:complexType> <xs:choice maxOccurs="unbounded"> <xs:element ref="MulticastReceiver"/>
0
8206
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7967
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8220
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6621
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5713
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5392
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3875
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2353
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1452
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.