PC Review


Reply
Thread Tools Rate Thread

Dataset xml handling is a joke

 
 
Rein Petersen
Guest
Posts: n/a
 
      29th Jul 2003
Hi Folks,

Just felt a compelling urge to rant about how poor a job MS has done
accomodating xml schema in the dataset.

First, using the dataset's ReadXmlSchema() method to supply your own
hand-generated scheam, it creates the datasets but try returning the schema
using the WriteXmlSchema() method or simply return xml after populating the
datatables...

You don't get the same schema! It actually uses the id in your
hand-generated schema as the new top-level element ?!?

IF I WANTED MY XML REPRESENTED THAT WAY I WOULD HAVE DESIGNED MY SCHEMA AS
SUCH!!!
....

!!!!!!!!!!!!!!

.... no really, ... !!!!!!!!!!!!!!

Next, amongst many other problems, don't use an id in your hand-generated
schema that is the same name as the top-level element: it will actually
create duplicate top-level elements - ug.

Or, how about the fact that it actually it strips your own namespacing
completely. That is certainly the biggest slap in the face.

Oh, and forget about importing other schemas within your hand-generated
schema - it's totally oblivious.

Unbelievable!!!

Signed,

P.O.'d



 
Reply With Quote
 
 
 
 
Kathleen Dollard
Guest
Posts: n/a
 
      30th Jul 2003
Rein,

If your purpose is more than ranting, I'd suggest you clean this up and
submit it to the wish (afaik, you can do a wishlist search on
www.msdn.microsoft.com). I know XML in general is on their radar.

Although I have to wonder whether we want to output input schemas. Dunno.
I'd suggest you explain why having .NET store this specific schema is
important. Obviously a lot of schemas can match a particular set of data.

--
Kathleen (MVP-VB)



"Rein Petersen" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi Folks,
>
> Just felt a compelling urge to rant about how poor a job MS has done
> accomodating xml schema in the dataset.
>
> First, using the dataset's ReadXmlSchema() method to supply your own
> hand-generated scheam, it creates the datasets but try returning the

schema
> using the WriteXmlSchema() method or simply return xml after populating

the
> datatables...
>
> You don't get the same schema! It actually uses the id in your
> hand-generated schema as the new top-level element ?!?
>
> IF I WANTED MY XML REPRESENTED THAT WAY I WOULD HAVE DESIGNED MY SCHEMA AS
> SUCH!!!
> ...
>
> !!!!!!!!!!!!!!
>
> ... no really, ... !!!!!!!!!!!!!!
>
> Next, amongst many other problems, don't use an id in your hand-generated
> schema that is the same name as the top-level element: it will actually
> create duplicate top-level elements - ug.
>
> Or, how about the fact that it actually it strips your own namespacing
> completely. That is certainly the biggest slap in the face.
>
> Oh, and forget about importing other schemas within your hand-generated
> schema - it's totally oblivious.
>
> Unbelievable!!!
>
> Signed,
>
> P.O.'d
>
>
>



 
Reply With Quote
 
Rein Petersen
Guest
Posts: n/a
 
      30th Jul 2003
Hi Everyone,

Please accept my apologies for the rant. Anyway, Kathleen, you had asked why
we might want to "output input schemas".

Well, it's a matter of serialization (late-bound that is). Using developer
supplied (mapping) schemas, I am trying to build a platform that can read
and perform
operations on the data for which instances (xml docs or db mapping -> xml
doc) are to comply. The dataset, with it's support for child tables
(elements), is particularly suited for this task.
Except, the output xml is not nearly close enough to what the input schema
(used to create the datatables, relationships, and constraints) has defined.

The name of the dataset should not be found as a top-level element. It is
the developer's responsibility to ensure that the top-level table has a
single entry for outputing well-formed xml (a single top-level root element
that is)

Anyway, I only ranted because now they've gone way too far based on a botch
(even submitted .NET to ECMA) so several developers will likely "blindly"
use it and now we're stuck with it. It would make a little more sense for MS
to ease back on charging ahead and spend more time with the public on
matters relating to classes that involve xml.

I would have loved to had a say on the matter. But now it's too late and I
might as well build the whole thing myself (doesn't make much sense
inheriting a bloated set of classes that I must overide practically all the
methods and attributes).

Rein


 
Reply With Quote
 
Kathleen Dollard
Guest
Posts: n/a
 
      30th Jul 2003
Rein,

Glad to hear it, but I meant if you submit a wish you should explain why you
want the feature you are asking for.

Understanding where you are coming from - yes, you want to write your own
serialization for many data scenarios. The purpose of the ADO.NET default
serialization is a really simple solution where there is ADO.NET on both
ends. It is intended more to force your schema into a single ADO.NET
standard schema. This does have benefits. It allows you to bring data in
using any (OK, many) formats and then shove it out knowing it will be
understood as an ADO.NET dataset. And you can do that hardly knowing what
the word serialization means.

OTOH, a reasonable approach would be to make it easier for you to provide
your own serilziation for datasets.

--
Kathleen (MVP-VB)



"Rein Petersen" <(E-Mail Removed)> wrote in message
news:#(E-Mail Removed)...
> Hi Everyone,
>
> Please accept my apologies for the rant. Anyway, Kathleen, you had asked

why
> we might want to "output input schemas".
>
> Well, it's a matter of serialization (late-bound that is). Using developer
> supplied (mapping) schemas, I am trying to build a platform that can read
> and perform
> operations on the data for which instances (xml docs or db mapping -> xml
> doc) are to comply. The dataset, with it's support for child tables
> (elements), is particularly suited for this task.
> Except, the output xml is not nearly close enough to what the input schema
> (used to create the datatables, relationships, and constraints) has

defined.
>
> The name of the dataset should not be found as a top-level element. It is
> the developer's responsibility to ensure that the top-level table has a
> single entry for outputing well-formed xml (a single top-level root

element
> that is)
>
> Anyway, I only ranted because now they've gone way too far based on a

botch
> (even submitted .NET to ECMA) so several developers will likely "blindly"
> use it and now we're stuck with it. It would make a little more sense for

MS
> to ease back on charging ahead and spend more time with the public on
> matters relating to classes that involve xml.
>
> I would have loved to had a say on the matter. But now it's too late and I
> might as well build the whole thing myself (doesn't make much sense
> inheriting a bloated set of classes that I must overide practically all

the
> methods and attributes).
>
> Rein
>
>



 
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
dataset handling text field Muhammad Ahsin Saleem Microsoft ASP .NET 0 24th Nov 2006 12:02 PM
Typed Dataset event handling problem =?Utf-8?B?THVjYXMgUG9uem8=?= Microsoft ADO .NET 11 15th Nov 2006 03:06 PM
Event Handling in DataGridView with DataSet Wizard Liz Microsoft VB .NET 0 3rd Apr 2006 05:55 PM
NO JOKE MAKE THOUSANDS USING PAYPAL WITH 6 MEASLY DOLLARS THINK IM KIDDING JUST READ AND FIND OUT NO JOKE MustangW302GT94@aol.com Storage Devices 0 14th Apr 2005 04:52 AM
Question about best practices with SqlConnection, error handling and memory handling Lars-Erik Aabech Microsoft ADO .NET 9 17th Apr 2004 06:11 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:14 PM.