Schema Collection -> Strongly Typed Dataset

G

Guest

I have a bunch of .xsd files some of which inherit from others, such that
there are elements that have attributes in one file and also inherts other
attributes from another file. These schemas come from an external source (I
have no control over them). We plan to store the .xml documents as they come
in (using Oracle XML DB), then read them in, validate and manipulate them in
Visual Studio (2005 beta due to a bug in 2003 that the schemas abuse).

I want to create a strongly typed dataset, so that when I read the document
in I can reference it using the tables and columns in the dataset. How do I
go about creating this dataset from the (20+) schemas?
 
K

Kevin Yu [MSFT]

Hi Vicki,

I agree with Sahil, that the xsd schema must be qualifies to be a DataSet
schema. Also, as far as I know, there is no elegant way to load the schema
from several xsd files. The only way I can see, is to combine them with
XSLT, and then load to a DataSet using DataSet.ReadXmlSchema. HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
G

Guest

Maybe my question is a 2005 Beta IDE question after all. I loaded all of the
xsd files into a test project, then went to the lowest level xsd (the one
that inherits from all of the others), and was able to preview the dataset
and it looks fine, I see all the attributes. I told it to generate the
dataset, and after saving all, when I go to the object browser, I expected to
see a new class in my project that inherits from dataset and contains
datatables for the elements in the schema. But I do not see this or anything
close in the object browser.

So it seems that my schema is in fact qualified to be a dataset, although I
have not yet tried the tricks you and Sahil mention. My goal is to be able
to write code to manipulate the XML document using the strongly typed
dataset, but I have not yet convinced myself that I have successfully
generated it, as I can not view it in Visual Studio.

Is there something I am missing?
 
K

Kevin Yu [MSFT]

Hi Vicki,

Since the schemas are loaded and the class for the typed dataset cannot be
generated, I assume that the schema files are not qualified for a DataSet
Schema. Because Visual Studio .NET 2005 is a beta version, besides posting
here, you can also try posting in the following newsgroup. It is dedicated
for VS.NET 2005 questions.

http://communities.microsoft.com/newsgroups/default.asp?icp=whidbey&slci
d=us

HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
G

Guest

Thanks Kevin,

I did in fact find that the way to generate a Strongly typed dataset from a
schema in 2005 is different, and was finally successful in doing so. I think
there is a bug in the MSDataSetGenerator tool, but I found a way to work
around it and I will report it there. Thanks for the link.

Vicki
 
K

Kevin Yu [MSFT]

You're welcome, Vicki. Thanks for give feedback to our product.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top