473,804 Members | 3,548 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DataSet WriteXML generates 'NewDataSet'

bav
Hi;
I would like to produce this kind of XML output using VB.NET 2003
DataSet.ReadXML Schema, and add some row contents, and finally
DataSet.WriteXM L

<test>
<header>
<name>...</name>
<description>.. .</description>
</header>
<subject>
<lkfdsjldsjfl ..ds.f
</subject>
</test>

question:
- how would the XML schema look like ?

output is always wrong:

It starts with root element 'NewDataSet' and <testsubeleme nt
or, when i specify schema id="test", it starts output with root element
<testand again
<testas subelement which is not what i want.

How can i fix this or is this the nature of DataSet ?

regards
Baudewijn Vermeire
Aug 24 '06 #1
1 5645
"bav" wrote:
Hi;
I would like to produce this kind of XML output using VB.NET 2003
DataSet.ReadXML Schema, and add some row contents, and finally
DataSet.WriteXM L

<test>
<header>
<name>...</name>
<description>.. .</description>
</header>
<subject>
<lkfdsjldsjfl ..ds.f
</subject>
</test>

question:
- how would the XML schema look like ?

output is always wrong:

It starts with root element 'NewDataSet' and <testsubeleme nt
or, when i specify schema id="test", it starts output with root element
<testand again
<testas subelement which is not what i want.

How can i fix this or is this the nature of DataSet ?

regards
Baudewijn Vermeire
Another way might be to write your xml document the way you want it to be
exactly, and then generate the schema from the xml document using an XML ->
XSD converter. Then include the schema in your project and call your
ReadXmlSchema() method on it.

When you include the Schema you should then be able to view the Schema in
the Schema designer (i'm o VS2005) not sure if VS 2003 has one though?

HTH

David
Aug 28 '06 #2

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

Similar topics

3
4610
by: Bill C. | last post by:
Hi, I've got a simple console app that just reads an XML file into a DataSet then prints out a description of each table in the DataSet, including column names and row values for each column. I'm getting some strange results depending the input XML file I use. I was wondering if somebody could help me understand what is going on or point me to a good reference. The code for my program looks like this:
1
4500
by: jk | last post by:
I need help in writing a datatable as xml in an aspx page. I have an excel client that opens the response as a stream into a recordset. In converting this code to .net c# from asp vb (where is used an adodb.stream, I can't seem to get the output right. I've tried the a gazillion methods, using memorystream, xmltextwriter, xmldatadoc, etc. all returning invalid xml (see below). What i need is xml that looks like the code at the end of this...
1
1906
by: buran | last post by:
Dear ASP.NET Programmers, I need your help on the following case: 1. I have a page coverpage.aspx, on which I load invoice data into the datalist control dliHospCosts. I use the stored procedure spGetHospAmounts and load the data. <ItemTemplate> <TABLE id="Table77" width="100%"> <TR>
0
288
by: John Knoop | last post by:
Hi all! I have a dataset filled containing one row of data. Dataset.WriteXML gives me this: <Article> <Table> <aID>10</aID> <aHeader>Some text goes here</aHeader> <aDate>2003-07-04T12:06:00.0000000+02:00</aDate>
0
960
by: George Durzi | last post by:
Check out this Xml <NewDataSet> <Table> <GB_JOB_ID>8060</GB_JOB_ID> <SALES_CODE>160</SALES_CODE> <JOB_NUMBER>040435</JOB_NUMBER> <JOB_NUMBER_FORMATTED>160-040435</JOB_NUMBER_FORMATTED> <PRIMARY_COMPANY>Some Company</PRIMARY_COMPANY> <STUDY_NAME>Name of Study</STUDY_NAME>
3
9036
by: INeedADip | last post by:
I have seen this problem posted all over, but have never ran across a solution.... I am serializing my dataset and they look like this: <NewDataSet> <xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
4
5015
by: nautiboy | last post by:
This seems like it should be so trivial, but try as I might I can't figure it out. I want to write out a dataset as xml (i.e., DataSet.WriteXml()) but use the tablename as the root element instead of the datasetname. For example, if I have: private void simpleDataSetXml() { DataSet ds = new DataSet(); DataTable table = new DataTable("foo"); DataColumn col = new DataColumn("bar", System.Type.GetType("System.String"));...
4
4322
by: clockemail | last post by:
Could somebody please point out my error in the following code. The dataset is returned by a stored procedure containing FOR XML AUTO, ELEMENTS, but the XML Document that is created contains &lt; and &gt; instead of < and >. I have tried everything that I can think of without any success, which probably means that I am missing something obvious. Dim dsERF As New DataSet dsERF = clsList.TableData
4
9616
by: =?Utf-8?B?anAybXNmdA==?= | last post by:
I've got a DataSet that I save as XML using the DataSet DataTable's WriteXml method. If I say XmlWriteMode.IgnoreSchema, it shows up great in Excel, but I can not reopen the file in my application because there is no schema for it. On the other hand, I can choose XmlWriteMode.WriteSchema, and the data in Excel looks more like some kind of code instead of the data: id=NewDataSet, name=NewDataSet, ns1:IsDataSet=TRUE, etc. If I open this...
0
9706
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, 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...
0
10571
Oralloy
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...
1
10317
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10075
tracyyun
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...
0
6851
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4295
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3815
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2990
bsmnconsultancy
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...

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.