Groups | Blog | Home
all groups > dotnet xml > may 2004 >

dotnet xml : Getting XML out of Dataset


Richard
5/21/2004 4:31:03 AM
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

Mark Miller
5/21/2004 7:19:19 AM
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.aspx?scid=kb;EN-US;311937

Cowboy
5/21/2004 10:29:19 AM
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!
************************************************
[quoted text, click to view]
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.
[quoted text, click to view]

Daniel Cazzulino [MVP XML]
5/25/2004 3:27:12 PM
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

[quoted text, click to view]
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.
[quoted text, click to view]


---
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

AddThis Social Bookmark Button