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

reading Dataset xml file

i have a dataset and the first row of the dataset is empty. It looks like
this

<NewDataSet>
<ImportData />
<ImportData>
<State>Delaware</State>
<City>Dover</City>
</ImportData>
<ImportData>
<State>New York</State>
<City>Fishkill</City>
</ImportData>
<ImportData>
<State>Delaware</State>
<City>Wilmington</City>
</ImportData>
<ImportData>
<State>New York</State>
<City>Syracuse</City>
</ImportData>
</NewDataSet>

How can I read this skip the first <ImportData> tag since it will always be
blank, then group the states so i see
Delaware Dover
Wilmington
New York Fishkill
Syracuse

Nov 17 '05 #1
2 1050
Just remove the row after you read it in. Then, use
the .Select method on the DataTable object.

--
2004 and 2005 Microsoft MVP C#
Robbe Morris
http://www.robbemorris.com
http://www.masterado.net

"microsoft.news.com" <me@me.com> wrote in message
news:ew**************@TK2MSFTNGP15.phx.gbl...
i have a dataset and the first row of the dataset is empty. It looks like
this

<NewDataSet>
<ImportData />
<ImportData>
<State>Delaware</State>
<City>Dover</City>
</ImportData>
<ImportData>
<State>New York</State>
<City>Fishkill</City>
</ImportData>
<ImportData>
<State>Delaware</State>
<City>Wilmington</City>
</ImportData>
<ImportData>
<State>New York</State>
<City>Syracuse</City>
</ImportData>
</NewDataSet>

How can I read this skip the first <ImportData> tag since it will always
be blank, then group the states so i see
Delaware Dover
Wilmington
New York Fishkill
Syracuse


Nov 17 '05 #2
I never done this before, do you have a code snippet or can you point me to
an example of this being done?
"Robbe Morris [C# MVP]" <in**@eggheadcafe.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Just remove the row after you read it in. Then, use
the .Select method on the DataTable object.

--
2004 and 2005 Microsoft MVP C#
Robbe Morris
http://www.robbemorris.com
http://www.masterado.net

"microsoft.news.com" <me@me.com> wrote in message
news:ew**************@TK2MSFTNGP15.phx.gbl...
i have a dataset and the first row of the dataset is empty. It looks like
this

<NewDataSet>
<ImportData />
<ImportData>
<State>Delaware</State>
<City>Dover</City>
</ImportData>
<ImportData>
<State>New York</State>
<City>Fishkill</City>
</ImportData>
<ImportData>
<State>Delaware</State>
<City>Wilmington</City>
</ImportData>
<ImportData>
<State>New York</State>
<City>Syracuse</City>
</ImportData>
</NewDataSet>

How can I read this skip the first <ImportData> tag since it will always
be blank, then group the states so i see
Delaware Dover
Wilmington
New York Fishkill
Syracuse



Nov 17 '05 #3

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

Similar topics

1
by: hzgt9b | last post by:
(FYI, using VB .NET 2003) Can someone help me with this... I'm trying to read in an XML file... it appears to work in that the DataSet ReadXML method dose not fail and then I am able to access the...
4
by: Amit Maheshwari | last post by:
I need to read text file having data either comma seperated or tab seperated or any custom seperator and convert into a DataSet in C# . I tried Microsoft Text Driver and Microsoft.Jet.OLEDB.4.0...
9
by: dba123 | last post by:
I need some help and direction on what classes and an example or two (article) on how to read an Excel Worksheet and insert one column into a database table column. I am using .NET 2.0 only. What...
3
by: Brad | last post by:
I'm having a problem reading data from an Excel file into a dataset. Can anybody give me an idea of what's happening? I've included the problematic source and the error message to the end of this...
1
by: sachinkale123 | last post by:
Hi, I am reading excel file and reading values from that I am using provider As : "Provider=Microsoft.Jet.OLEDB.4.0;Data Source = " + Filename + ";Extended Properties=\"Excel 8.0;Hdr=No;IMEX=1\"";...
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$) { } ...
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
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
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,...

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.