Hi,
I have a problem with reading an XmlSchema with Frameowk 2.0 and an
own DataType. I found no example
(searching two days).
What I do is:
DataSet dataSet = new DataSet();
dataSet.ReadXml ("{path}/MySchemaAndData .xml");
dataView = dataSet.Tables[0];
dataGridView.Da taSource = dataView;
Easy with Framework 1.1 (VisualStudio 2003). Everything is working
fine. Now with rameowrk 2.0 I get one
error after another, maybe someone can help me solve the problem,
knows a link or what ever. I'm really
despairing.
If need, i can write more information, what i tried unsuccesfully for
the last 20h.
The Schema looks like following:
<?xml version="1.0" encoding="ISO-8859-1"?>
<Data version="V1.0.0 .0">
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" id="daten"
xmlns="" xmlns:msdata="u rn:schemas-microsoft-com:xml-msdata">
<xs:element name="data" msdata:IsDataSe t="true" msdata:Locale=" de-
DE">
<xs:complexType >
<xs:choice maxOccurs="unbo unded">
<xs:element name="aTableNam e" msdata:Expressi on="Column">
<xs:complexType >
<xs:attribute name="Column" type="xs:string "
type="xs:string " msdata:DataType ="MyNamespace.M yClass, MyAssemlyName,
Version=1.0.0.0 , Culture=neutral , PublicKeyToken= null"/>/>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
<aTableName Column="1"/>
</Data> 2 3698
"Martin Madreza" <ma*********@ya hoo.dewrote in message
news:11******** *************@q 2g2000cwa.googl egroups.com...
Hi,
I have a problem with reading an XmlSchema with Frameowk 2.0 and an
own DataType. I found no example
(searching two days).
....
The Schema looks like following:
<?xml version="1.0" encoding="ISO-8859-1"?>
<Data version="V1.0.0 .0">
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" id="daten"
xmlns="" xmlns:msdata="u rn:schemas-microsoft-com:xml-msdata">
<xs:element name="data" msdata:IsDataSe t="true" msdata:Locale=" de-
DE">
<xs:complexType >
<xs:choice maxOccurs="unbo unded">
<xs:element name="aTableNam e" msdata:Expressi on="Column">
<xs:complexType >
<xs:attribute name="Column" type="xs:string "
type="xs:string " msdata:DataType ="MyNamespace.M yClass, MyAssemlyName,
Version=1.0.0.0 , Culture=neutral , PublicKeyToken= null"/>/>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
<aTableName Column="1"/>
</Data>
As a first guess, I'd suggest you extract that schema from the data.
Secondly, your data does not match your schema. "Data" is not the same as
"data".
John
hi,
yes sorry, i copied the schema from the original and modified a litte
(from german tio english)...
i extract the dqata from the data set with a testproject, the result
is, that
'msdata:DataTyp e="MyNamespace. MyClass, MyAssemlyName'
becomes an element. it's not possible to set them (in the dataset) to
an attribute. the element is under a xs:sequence, and the structur
changes...
so far it works. but i cant set the value from the schema. in the
example below column value 1 is never set. in 1.1 everything works,
now i found nothing about what changed in 2.0 and what i have to
change to make it work. does any example exist with DataType =
OwnDataType?
hope you can help me to come forward... and sorry for the bad example.
if something ambiguous, please tell and i try to specify it
here is the example
<?xml version="1.0" standalone="yes "?>
<data>
<xs:schema id="data" xmlns="" xmlns:xs="http://www.w3.org/2001/
XMLSchema" xmlns:msdata="u rn:schemas-microsoft-com:xml-msdata">
<xs:element name="data" msdata:IsDataSe t="true" msdata:Locale=" de-
DE">
<xs:complexType >
<xs:choice minOccurs="0" maxOccurs="unbo unded">
<xs:element name="aTableNam e">
<xs:complexType >
<xs:sequence>
<xs:element name="Column" type="xs:string "
msdata:DataType ="MyNamespace.M yClass, MyAssemlyName, Version=1.0.0.0 ,
Culture=neutral , PublicKeyToken= null"/>/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
<aTableName>
<Column>1</Column>
</aTableName>
</data> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Max |
last post by:
Suppose we have an object hierarchy in XSD.
For example, let us take Control, Label, TextBox and LinkLabel windows
controls.
Each control has some properties which are represented as elements.
Some of the elements are of complex types as well, like bounds - of type
rectangle.
(See full example in the bottom of the letter.)
DataSet.ReadXMLSchema fails to parse such XSD file.
The problem is caused by complex type as an element of the...
|
by: Marco Martin |
last post by:
Hi everyone,
I've got a dataset with a records table that is built up from scratch
according to user input. I'm saving this dataset as xml by using
dsRecords.WriteXml(dlgSave.FileName,XmlWriteMode.WriteSchema);
The first problem I had was that all hidden columns (ie: recordID) values
were not written to file. So I set the mapping types of the hidden columns
back to "Element" just before saving.
|
by: Brian Keating |
last post by:
wonder if anyone can help me here,
i've a framework 1.1 dataset which i serialize in framework 1.1 and
deserialize in framework 2.0.
This is fine, problem is that i want to modify some of the records in
framework 2.0 and serialize the data so framework 1.1 can deserialize it and
do what it required.
Is this possible?
|
by: Mae |
last post by:
Dear All,
I have a problem here, I'm using C# Webform calling a webservices. The
webservices return me a XMLnode, using this XMLnode I want to convert it to
dataset so I can bind to the datagrid, by extracting the
<CustomerData></CustomerData> block from the xmlnode.
Below is the sample of xmlnode return from webservices.
<?xml version="1.0" encoding="utf-8"?>
|
by: Steve |
last post by:
I would not have thought that getting a DataGrid connected to a DataSet
(read in from an XML file) would be this complicated. I cannot get this to
work. I have read everything I could find and modeled all the examples
given but this grid just refuses to behave nicely.
The code is listed below as well as the XML schema and XML data.
The connection between the data set and grid seems to work just fine. What
won't work is the display...
| |
by: MarkAurit |
last post by:
How does one go about getting the information from an .xsd file into a WSDL
document? I have a web service that creates a simple object that IBM
Websphere can see and use. Great.
However, when I expose a DataSet, Websphere cant use the WSDL document, as
it doesnt describe the data elments in the dataset. Im done a lot of
readying and looking at posts, and typed datasets sounds like they might be
the answer, but I cant figure out how to...
|
by: Arne |
last post by:
How do I pass a dataset to a webservices? I need to submit a shoppingcart
from a pocket PC to a webservice.
What is the right datatype?
II have tried dataset as a datatype, but I can't get it to compile.
<WebMethod()> _
Public Function VerifySku(ByVal skus As XmlDataDocument) As DataSet
Test program :
Dim cartSet As DataSet
cartSet = ws.VerifySku(cartSet)
|
by: David P. Donahue |
last post by:
I'm re-writing an application in C# that was originally written in
Delphi 7. The heart of the application is a DataSet displayed in a
DataGrid.
One of the main functions of the previous application was to save the
data to a file (it was XML, but the format is unimportant) that can be
re-loaded into the DataSet at a later time. (The reason for this was
that the queries which populate the DataSet can take a while to run, and
people...
|
by: Angel \Java\ Lopez |
last post by:
Hi people!
I'm running a Visual Studio 2005, Professional, on Windows XP Professional.
I've found a little big problem, reading a DataSet. If I try:
ds.ReadXml("c:\data.xml")
it raises the exception ONLY in Web Sites:
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |