473,394 Members | 1,761 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Getting XML out of Dataset

Hi

Is it possible to define exactly what format the XML takes when you create it from a Dataset. I have defined a XML schema but the XML I get from the Dataset (which is a strongly typed dataset using my XML schema) doesn't use this schema ie I get the standard element type xml document.

Regards

Richard
Nov 12 '05 #1
4 1929
It sounds like you would like to output attributes instead of elements. If
this is the case then use the DataColumn.ColumnMapping property:

http://support.microsoft.com/default...b;EN-US;311937
Nov 12 '05 #2
Those are the only two methods that I have seen.
"Richard" <rp**@newsgroups.nospan> wrote in message
news:6A**********************************@microsof t.com...
Ok

So I am correct in thinking that the only way to change the output style of XML from a dataset is to use the DataColumn.ColumnMapping property? And
if you want to change the style any further you will need to use XSL
Regards

Nov 12 '05 #3
Use a Transformation and an XSLT file against the XML from WriteXML. You can
then adjust the XML to any schema you desire. As far as automatically doing
it, there is no capability built in to .NET or VS.NET.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************
Think Outside the Box!
************************************************
"Richard" <rp**@newsgroups.nospam> wrote in message
news:AD**********************************@microsof t.com...
Hi

Is it possible to define exactly what format the XML takes when you create it from a Dataset. I have defined a XML schema but the XML I get from the
Dataset (which is a strongly typed dataset using my XML schema) doesn't use
this schema ie I get the standard element type xml document.
Regards

Richard

Nov 12 '05 #4
Maybe if you try "wrapping" the dataset in an XmlDataDocument you get
something closer to what you need...

--
Daniel Cazzulino [MVP XML]
Clarius Consulting SA
http://weblogs.asp.net/cazzu
http://aspnet2.com

"Richard" <rp**@newsgroups.nospam> wrote in message
news:AD**********************************@microsof t.com...
Hi

Is it possible to define exactly what format the XML takes when you create it from a Dataset. I have defined a XML schema but the XML I get from the
Dataset (which is a strongly typed dataset using my XML schema) doesn't use
this schema ie I get the standard element type xml document.
Regards

Richard

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.690 / Virus Database: 451 - Release Date: 23/05/2004
Nov 12 '05 #5

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

Similar topics

4
by: Frnak McKenney | last post by:
I'm using an in-core DataSet as an image of my application's 'database' (a multi-table Access97 mdb file). Updates are made to the DataTables within the DataSet via forms with bound TextBoxes,...
3
by: Saso Zagoranski | last post by:
Hi! A question about database tables... I have a SELECT statement: SELECT something FROM someTable WHERE code = @code The parameter code starts with 1 and is autoincremented... Now I want...
1
by: Oleg Shnayderman | last post by:
Hi All, I am very new to C# as well as to SQL. I need to write an application which is connecting to SQL DB and getting all the user's tables and after create a dataset for all the tables in the...
6
by: Erik H. | last post by:
Trying to connect to MySQL db on localhost, and populate datagrid from a dataset using code inline method. Getting the following compile error: Error Message: "CS0246: The type or namespace...
4
by: What-a-Tool | last post by:
I am trying to write a program that will take all the members of a data base, add them to a tree, with all child relations as sub-nodes. I am having a problem getting the parent child relations...
0
by: mike1402 | last post by:
Hi ! I get the error below sometimes when retrieving a big amount of data using Datadapter.Fill(dataset,"table"). But when I send the command Fill again, there is no error. Is it a fault of...
4
by: nch1978 | last post by:
I am new to programming and am sorry if this post is in the wrong area. I have a listbox bound to a table and a datagrid bound to another one with a connection through xml. I can change the data...
3
by: H | last post by:
I have a dataset with Customers, Orders, and Items tables. It has datarelations set between Customers-Orders and Orders-Items It has foreignkeyconstraints with update/delete rules set to cascade...
4
by: =?Utf-8?B?UHVjY2E=?= | last post by:
Why am I getting an error when I passed by ref a dataset to a new form? The message reads "cannot convert from 'ref Paimport.unixAccount' to 'ref System.Data.DataSet'. Paimport is the name of the...
2
by: rocketfire97 | last post by:
I'm trying to call a COM object using C# but having no luck getting values back for passed in ref objects. I've tried the same call using VB.NET and can get data back. How would I implement the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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...
0
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...

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.