PC Review


Reply
Thread Tools Rate Thread

Getting XML out of Dataset

 
 
=?Utf-8?B?UmljaGFyZA==?=
Guest
Posts: n/a
 
      21st May 2004
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
 
Reply With Quote
 
 
 
 
Mark Miller
Guest
Posts: n/a
 
      21st May 2004
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


 
Reply With Quote
 
Cowboy
Guest
Posts: n/a
 
      21st May 2004
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" <(E-Mail Removed)> wrote in message
news:AD06C778-A89B-4AC1-9CC4-(E-Mail Removed)...
> 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



 
Reply With Quote
 
Mark Miller
Guest
Posts: n/a
 
      21st May 2004
Those are the only two methods that I have seen.


"Richard" <(E-Mail Removed)> wrote in message
news:6AF1D57D-07F8-4EDB-A271-(E-Mail Removed)...
> 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



 
Reply With Quote
 
Daniel Cazzulino [MVP XML]
Guest
Posts: n/a
 
      25th May 2004
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" <(E-Mail Removed)> wrote in message
news:AD06C778-A89B-4AC1-9CC4-(E-Mail Removed)...
> 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


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to cast object of type 'System.Data.DataSet' to Typed DataSet Optimus Microsoft VB .NET 1 31st Jan 2006 07:26 AM
Ccopying a datatable content from an untyped dataset into a table which is inside a typed dataset Nedu N Microsoft ADO .NET 7 9th Dec 2003 03:50 PM
copying a datatable content from an untyped dataset into a table which is inside a typed dataset Nedu N Microsoft ADO .NET 2 31st Oct 2003 02:05 PM
copying a datatable content from an untyped dataset into a table which is inside a typed dataset Nedu N Microsoft ASP .NET 2 31st Oct 2003 02:05 PM
Ccopying a datatable content from an untyped dataset into a table which is inside a typed dataset Nedu N Microsoft ASP .NET 2 31st Oct 2003 03:42 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:51 AM.