473,385 Members | 1,780 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.

How to convert the XML File in to the Dataset

1
Hello i need urgent help

when i had convert the xml file to dataset like i used the
dtsXml.ReadXml("d:\\dog.xml") But it i had the problem

here the sample dog.xml file the problem i faced was only the <show> node has convert to the dataset but other nodes were leave it.

In the dataset 2 columns are created and only one row is added

Id Name
1 O'Reilly Invitational


I need all the rows are loaded in to the dataset using to below the xml file formot. But don't know the what are the nodes in the xml file, the nodes are going.............


<?xml version="1.0" standalone="yes"?>
<DogShow>
<Show>
<Id>1</Id>
<Name>O'Reilly Invitational</Name>
</Show>

<Breed>
<Id>1</Id>
<Name>English Springer Spaniel</Name>
</Breed>
<Dog>
<Id>1</Id>
<Name>Wil-Orion's Angus Highlander</Name>
<BreedId>1</BreedId>
</Dog>
<Dog>
<Id>2</Id>
<Name>Len-Lear's Webmaster</Name>
<BreedId>1</BreedId>
</Dog>
<Dog>
<Id>3</Id>
<Name>Ch. Sallylyn's Condor</Name>
<BreedId>1</BreedId>
</Dog>
<Judge>
<Id>1</Id>
<FirstName>John</FirstName>
<LastName>Smith</LastName>
</Judge>
<ShowRing>
<Id>1</Id>
<Name>Ring 1</Name>
</ShowRing>
<Judging>
<ShowTime>2002-10-20T14:00:00.0000000-04:00</ShowTime>
<BreedId>1</BreedId>
<JudgeId>1</JudgeId>
<ShowRingId>1</ShowRingId>
<ShowId>1</ShowId>
</Judging>
</DogShow>
Feb 23 '07 #1
1 1265
vijaydiwakar
579 512MB
Hello i need urgent help

when i had convert the xml file to dataset like i used the
dtsXml.ReadXml("d:\\dog.xml") But it i had the problem

here the sample dog.xml file the problem i faced was only the <show> node has convert to the dataset but other nodes were leave it.

In the dataset 2 columns are created and only one row is added

Id Name
1 O'Reilly Invitational


I need all the rows are loaded in to the dataset using to below the xml file formot. But don't know the what are the nodes in the xml file, the nodes are going.............


<?xml version="1.0" standalone="yes"?>
<DogShow>
<Show>
<Id>1</Id>
<Name>O'Reilly Invitational</Name>
</Show>

<Breed>
<Id>1</Id>
<Name>English Springer Spaniel</Name>
</Breed>
<Dog>
<Id>1</Id>
<Name>Wil-Orion's Angus Highlander</Name>
<BreedId>1</BreedId>
</Dog>
<Dog>
<Id>2</Id>
<Name>Len-Lear's Webmaster</Name>
<BreedId>1</BreedId>
</Dog>
<Dog>
<Id>3</Id>
<Name>Ch. Sallylyn's Condor</Name>
<BreedId>1</BreedId>
</Dog>
<Judge>
<Id>1</Id>
<FirstName>John</FirstName>
<LastName>Smith</LastName>
</Judge>
<ShowRing>
<Id>1</Id>
<Name>Ring 1</Name>
</ShowRing>
<Judging>
<ShowTime>2002-10-20T14:00:00.0000000-04:00</ShowTime>
<BreedId>1</BreedId>
<JudgeId>1</JudgeId>
<ShowRingId>1</ShowRingId>
<ShowId>1</ShowId>
</Judging>
</DogShow>
budy the problem is that with the new tag every time the new table is created u've to change the structure of thy xml file
with the above structure show becomes one tbl,brid become another tbl

so just change the structure and u will get the desired o/p
Feb 23 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Todd | last post by:
This is my first time trying to take the results of a query that reside in a Dataset and convert the dataset into an xml file. Everything works great, except that my resulting XML file is missing...
7
by: Jeff | last post by:
I want to remote several strongly typed datasets and I don't want to distribute the assemblies. I wish to create interface assemblies for these datasets but I don't know where to start. I've...
2
by: Ben Turner | last post by:
I'm querying a web service to get some global weather data (http://www.webservicex.net/globalweather.asmx?WSDL) which works really well, however I'm getting stuck on the returned data for the...
7
by: Ish2000 | last post by:
Hello, I've a simple windows application and i want to be able to convert a csv file to xml. So far, i can browse for the csv file from the file structure and display in a textbox. I want to...
12
by: Marc | last post by:
I have used XMLDataToString = DataSetForXML.GetXml() to get an XML string from a dataset. I am looking for a way to create a dataset from this XML string. I tried...
5
by: manmit.walia | last post by:
Hello All, I am stuck on a conversion problem. I am trying to convert my application which is written in VB.NET to C# because the project I am working on currently is being written in C#. I tried...
2
by: karups | last post by:
Hi when i convert Excel file to dataset using the following code, i find that, some col. such as Col1 ------ 404 403 NOT 222
1
mahet
by: mahet | last post by:
Anders Jansson was a guest here, and he was having problem: When I try to build the web, this error is displayed: ---> Error 5 Unable to convert input xml file content to a DataSet. Invalid...
3
by: cmrhema | last post by:
Hi, I want to send reports using email. I am going to retrieve the results in a dataset. Thereafter I want to store it in a text file and this text file i want to send as an attachment to the...
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: 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: 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: 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:
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
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,...
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.