473,385 Members | 2,004 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.

Error loading XML into DataSet

Hello,

When I try to load this xml file (see below) into an asp.net dataset
using the following code:

ds.ReadXml("xmlfilepath\xmlfile.xml", XmlReadMode.Auto)

I get the following error:

"The same table (description) cannot be the child table in two nested
relations. "

If I take out the anchor tag in the description it works fine,
however, I need the anchor tag in there. Does
anyone have any suggestions?

<?xml version="1.0" ?>
<rss version="2.0">
<channel>
<title>Liftoff News</title>
<link>http://liftoff.msfc.nasa.gov/</link>
<description>Liftoff to Space Exploration.</description>
<language>en-us</language>
<pubDate>Tue, 10 Jun 2003 04:00:00 GMT</pubDate>
<lastBuildDate>Tue, 10 Jun 2003 09:41:01 GMT</lastBuildDate>
<docs>http://blogs.law.harvard.edu/tech/rss</docs>
<generator>Weblog Editor 2.0</generator>
<managingEditor>ed****@example.com</managingEditor>
<webMaster>we*******@example.com</webMaster>
<item>
<title>Star City</title>
<link>http://liftoff.msfc.nasa.gov/news/2003/news-starcity.asp</link>
<description>How do Americans get ready to work with Russians aboard
the International Space Station? They take a crash course in culture,
language and protocol at Russia's <a
href="http://howe.iki.rssi.ru/GCTC/gctc_e.htm">Star
City</a>.</description>
<pubDate>Tue, 03 Jun 2003 09:39:21 GMT</pubDate>
<guid>http://liftoff.msfc.nasa.gov/2003/06/03.html#item573</guid>
</item>
</channel>
</rss>

Thanks in advance.
Nov 12 '05 #1
4 4015
Do you really have to read your XML document into a DataSet? What are you
trying to do with the DataSet after you loaded the XML?

--
HTH
Christoph Schittko [MVP]
Software Architect, .NET Mentor

"Kathryn" <kb********@yahoo.com> wrote in message
news:5d*************************@posting.google.co m...
Hello,

When I try to load this xml file (see below) into an asp.net dataset
using the following code:

ds.ReadXml("xmlfilepath\xmlfile.xml", XmlReadMode.Auto)

I get the following error:

"The same table (description) cannot be the child table in two nested
relations. "

If I take out the anchor tag in the description it works fine,
however, I need the anchor tag in there. Does
anyone have any suggestions?

<?xml version="1.0" ?>
<rss version="2.0">
<channel>
<title>Liftoff News</title>
<link>http://liftoff.msfc.nasa.gov/</link>
<description>Liftoff to Space Exploration.</description>
<language>en-us</language>
<pubDate>Tue, 10 Jun 2003 04:00:00 GMT</pubDate>
<lastBuildDate>Tue, 10 Jun 2003 09:41:01 GMT</lastBuildDate>
<docs>http://blogs.law.harvard.edu/tech/rss</docs>
<generator>Weblog Editor 2.0</generator>
<managingEditor>ed****@example.com</managingEditor>
<webMaster>we*******@example.com</webMaster>
<item>
<title>Star City</title>
<link>http://liftoff.msfc.nasa.gov/news/2003/news-starcity.asp</link>
<description>How do Americans get ready to work with Russians aboard
the International Space Station? They take a crash course in culture,
language and protocol at Russia's <a
href="http://howe.iki.rssi.ru/GCTC/gctc_e.htm">Star
City</a>.</description>
<pubDate>Tue, 03 Jun 2003 09:39:21 GMT</pubDate>
<guid>http://liftoff.msfc.nasa.gov/2003/06/03.html#item573</guid>
</item>
</channel>
</rss>

Thanks in advance.

Nov 12 '05 #2
Do you really have to read your XML document into a DataSet? What are you
trying to do with the DataSet after you loaded the XML?

--
HTH
Christoph Schittko [MVP]
Software Architect, .NET Mentor

"Kathryn" <kb********@yahoo.com> wrote in message
news:5d*************************@posting.google.co m...
Hello,

When I try to load this xml file (see below) into an asp.net dataset
using the following code:

ds.ReadXml("xmlfilepath\xmlfile.xml", XmlReadMode.Auto)

I get the following error:

"The same table (description) cannot be the child table in two nested
relations. "

If I take out the anchor tag in the description it works fine,
however, I need the anchor tag in there. Does
anyone have any suggestions?

<?xml version="1.0" ?>
<rss version="2.0">
<channel>
<title>Liftoff News</title>
<link>http://liftoff.msfc.nasa.gov/</link>
<description>Liftoff to Space Exploration.</description>
<language>en-us</language>
<pubDate>Tue, 10 Jun 2003 04:00:00 GMT</pubDate>
<lastBuildDate>Tue, 10 Jun 2003 09:41:01 GMT</lastBuildDate>
<docs>http://blogs.law.harvard.edu/tech/rss</docs>
<generator>Weblog Editor 2.0</generator>
<managingEditor>ed****@example.com</managingEditor>
<webMaster>we*******@example.com</webMaster>
<item>
<title>Star City</title>
<link>http://liftoff.msfc.nasa.gov/news/2003/news-starcity.asp</link>
<description>How do Americans get ready to work with Russians aboard
the International Space Station? They take a crash course in culture,
language and protocol at Russia's <a
href="http://howe.iki.rssi.ru/GCTC/gctc_e.htm">Star
City</a>.</description>
<pubDate>Tue, 03 Jun 2003 09:39:21 GMT</pubDate>
<guid>http://liftoff.msfc.nasa.gov/2003/06/03.html#item573</guid>
</item>
</channel>
</rss>

Thanks in advance.

Nov 12 '05 #3
I'm trying to accomplish the same task and I'm receiving the same error.
I'm new to VB.Net programming and I'm trying to learn the best practices
for parsing out XML files. By reading the XML file into a DataSet, I
figured it would be easy to process tables inside a DataSet since I'm
familar with processing DataSets.

My final result is populating some tables in our database based on the
data in the XML file. Please offer some other suggestions (& reasons)
for accomplishing this task.

Thanks in advance.


*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #4
I'm trying to accomplish the same task and I'm receiving the same error.
I'm new to VB.Net programming and I'm trying to learn the best practices
for parsing out XML files. By reading the XML file into a DataSet, I
figured it would be easy to process tables inside a DataSet since I'm
familar with processing DataSets.

My final result is populating some tables in our database based on the
data in the XML file. Please offer some other suggestions (& reasons)
for accomplishing this task.

Thanks in advance.


*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #5

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

Similar topics

2
by: Patrick J. Schouten | last post by:
I am trying to transfor an XML document prior to loading into a Dataset. My problem stems from the known bug in Visual Studio that prevents loading a well formed XML because of duplicate child...
0
by: oj | last post by:
I have a dataset with a parent table and 3 child tables. The dataset is filled and manipulated on one particular web page. During the user interaction one of the child tables can have records...
4
by: dtblankenship | last post by:
Hello everyone, I know this question has been asked many times in the forums, and after spending a few days reading, I am still confused as to the answer. I have a ListBox (lstBox),...
4
by: Fred Nelson | last post by:
I have an applicatioin that I'm writing that uses a "case" file that contains over 350 columns and more may be added in the future. I would like to create a dataset with all the column names and...
2
by: Henrik | last post by:
im reciving an error when i tries to read multidimensional XML data, into my system. I'm receving the same errors discriped at: http://support.microsoft.com/default.aspx?scid=kb;en-us;325695...
0
by: robinsimon_m | last post by:
I am having an error while loading the dataset in crystal report. The error is login failed. when we add a single element in the dataset by doing right click the dataset page and selecting the...
3
by: John J. Hughes II | last post by:
I have a SqlDataAdapter.Fill filling a standard dataset and my code is returning the below error. The "Error Loading data" is just a message my code displays. "Error:" is the Exception.Message...
7
by: koonda | last post by:
Hi guys, I am trying to create a web interface in C# using ASP.NET. The database being used is SQL Server. I have some problems loading the tables in the datalist controls. When I run the program...
1
by: =?Utf-8?B?QVZM?= | last post by:
Hi, I've a requirement where in I need to read the data from a csv file and load the data into the sql database. The file has around 1 lakh records. I'm reading 300 records at a time from 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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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
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.