473,385 Members | 1,973 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

am I misunderstanding readxmlschema ?

I am writing an xml file from a dataset. I don't want the xml file to use
the table names, I don't want the schema inferred from the dataset. Because
of this I created an xsd to provide an explicit schema. I create my dataset
object, I set it's readxmlschema to my xsd file, then I writexml.
From what I've read I expect the output to use my schema. But what I get is
both schemas, my xsd and from the dataset. I can't find if I'm implementing
incorrectly or if I just can't accomplish this, so I'm here looking for
help.

David Bartosik - [MSFT MVP]
www.publishermvps.com
www.davidbartosik.com
Nov 12 '05 #1
1 1098
Hi David,

The schema you're reading to a DataSet must accord with a DataSet Schema
specification. If you use some other schemas, the schema will be mapped to
a DataSet schema automatically. So in this case, I suggest you try to do
the following to get your desired Xml:

1. Write the Xml using DataSet.WriteXml.
2. Use an XSL stylesheet to transform this xml into the desired format.

HTH.

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

Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: DraguVaso | last post by:
Hi, I should use XML to synchronize the data from different (VB.NET) applications, and I was just wondering which Overloads of these functions ( ReadXmlSchema, ReadXml and WriteXml) goes the...
0
by: Pete | last post by:
I am trying to load a DataSet from an xml file that has 2 tables in it. Any help would be great. Here is the C# code snipit on how I load it. Instead of geting a dataset with 2 table I am...
0
by: Greg | last post by:
I'm trying to use the ReadXmlSchema method of the DataSet class from behind a firewall/proxy server and can't get it to work. I can run the code on a machine not behind the firewall and it works...
0
by: Patrick Kearney | last post by:
Hi All, I have seen this type of question raised in various groups but no one has supplied a definitive answer. I am trying to load a dataset schema that has an xs:include. Project policy is to...
0
by: Eric van Wijk | last post by:
Hi, When I try to assign a schema to a dataset using the ReadXmlSchema method, that schema does not import any schemas included with xs:import. Both schema's are stored in the assembly as...
1
by: Tarun Upadhyay | last post by:
I am trying to read the standard UDDI schema using a DataSet. however, it always chokes with error. Here are the full details: Schema used: http://uddi.org/schema/uddi_v3.xsd C# (.NET) calls...
1
by: JG | last post by:
Hi, I have a quick question regarding the proper use of ReadXmlSchema. For example I have the following code. DataSet ds = new DataSet(); ds.ReadXmlSchema("c:\\XMLInputFile.xsd"); I was...
13
by: Jerry C | last post by:
I am using some sample code from gotdotnet to Create DataSet mappings from a xsd schema. I am geting this error. code and error below. I might mention there is also a publictypelibrary file with...
2
by: Sambo | last post by:
Hi All I've had a look around and noticed a couple of others having this issue, but with no replies. Hopefully someone can help with this. I have a schema (let's call it "Schema1.xsd") that I...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
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...
0
jinu1996
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.