473,386 Members | 1,720 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,386 software developers and data experts.

DataSet WriteXML generates 'NewDataSet'

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

<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 <testsubelement
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 5624
"bav" wrote:
Hi;
I would like to produce this kind of XML output using VB.NET 2003
DataSet.ReadXMLSchema, and add some row contents, and finally
DataSet.WriteXML

<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 <testsubelement
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
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. ...
1
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...
1
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...
0
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>...
0
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>...
3
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=""...
4
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...
4
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...
4
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...
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$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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.