473,656 Members | 2,983 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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("xml filepath\xmlfil e.xml", XmlReadMode.Aut o)

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>Liftof f News</title>
<link>http://liftoff.msfc.na sa.gov/</link>
<description>Li ftoff 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.harva rd.edu/tech/rss</docs>
<generator>Webl og Editor 2.0</generator>
<managingEditor >ed****@example .com</managingEditor>
<webMaster>we** *****@example.c om</webMaster>
<item>
<title>Star City</title>
<link>http://liftoff.msfc.na sa.gov/news/2003/news-starcity.asp</link>
<description>Ho w 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.r u/GCTC/gctc_e.htm">Sta r
City</a>.</description>
<pubDate>Tue, 03 Jun 2003 09:39:21 GMT</pubDate>
<guid>http://liftoff.msfc.na sa.gov/2003/06/03.html#item573 </guid>
</item>
</channel>
</rss>

Thanks in advance.
Nov 12 '05 #1
4 4033
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********@yah oo.com> wrote in message
news:5d******** *************** **@posting.goog le.com...
Hello,

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

ds.ReadXml("xml filepath\xmlfil e.xml", XmlReadMode.Aut o)

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>Liftof f News</title>
<link>http://liftoff.msfc.na sa.gov/</link>
<description>Li ftoff 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.harva rd.edu/tech/rss</docs>
<generator>Webl og Editor 2.0</generator>
<managingEditor >ed****@example .com</managingEditor>
<webMaster>we** *****@example.c om</webMaster>
<item>
<title>Star City</title>
<link>http://liftoff.msfc.na sa.gov/news/2003/news-starcity.asp</link>
<description>Ho w 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.r u/GCTC/gctc_e.htm">Sta r
City</a>.</description>
<pubDate>Tue, 03 Jun 2003 09:39:21 GMT</pubDate>
<guid>http://liftoff.msfc.na sa.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********@yah oo.com> wrote in message
news:5d******** *************** **@posting.goog le.com...
Hello,

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

ds.ReadXml("xml filepath\xmlfil e.xml", XmlReadMode.Aut o)

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>Liftof f News</title>
<link>http://liftoff.msfc.na sa.gov/</link>
<description>Li ftoff 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.harva rd.edu/tech/rss</docs>
<generator>Webl og Editor 2.0</generator>
<managingEditor >ed****@example .com</managingEditor>
<webMaster>we** *****@example.c om</webMaster>
<item>
<title>Star City</title>
<link>http://liftoff.msfc.na sa.gov/news/2003/news-starcity.asp</link>
<description>Ho w 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.r u/GCTC/gctc_e.htm">Sta r
City</a>.</description>
<pubDate>Tue, 03 Jun 2003 09:39:21 GMT</pubDate>
<guid>http://liftoff.msfc.na sa.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
4488
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 names: http://support.microsoft.com/default.aspx?scid=kb;en-us;325696 Anyway, I want to transform the XML using the XSLT to get around this problem, but I am having a tough time coming up with a way to apply the XSLT before loading it into the...
0
1468
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 inserted,edited, or deleted. Upon clicking save I call the Update method of my dataAdapter mapped to the child table in my db and pass the dataset childtable in as a parameter. I'm getting an inconsistent foreign key constraint error. The error is...
4
4203
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), SqlConnection (sqlConnection), SqlDataAdapter (daLookupData), SqlDataAdapter (daData), DataSet (dsLookupData), and DataSet (dsData), all created via the IDE during design-time. Here is the design of my simple tables: (An example since I can't post my...
4
357
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 only one case record that is delivered by a stored procedure. (I have a stored procedure that works so my question is only on loading the DataSet.) The DataSet will only be used for printing form letters and then will be zapped. I would like...
2
1359
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 And http://support.microsoft.com/kb/325696/EN-US/ But I can't find a solution for the problem???
0
896
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 new element option. No error is coming that time. But when i add multiple elements in the a single dataset and connecting that dataset to crystal report then error what i mentioned is coming. can somebody please tell me whats the problem there...
3
1581
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 message and then below that is the stack trace. The strange part is the "Error:" data is data from the SQL database and obviously not an error so I don't see how or why it is there. Any clues for determining why the code is throwing an...
7
1801
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 the DataList controls are loaded not with tables but something like this: "System.Data.DataRowView" in the three list boxe controls. Because I have three tables and I want to load them in the three list box controls. And then I want to select values...
1
1217
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 file, loading into a dataset. From the dataset, I'm reading the rows sequentially,and updating one by one in to the database. This happens with a sql trnasaction. The problem is here with the performance.. The file to be loaded exists on one...
0
8816
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...
0
8710
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7310
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6162
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5627
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
4150
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4299
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2721
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
1598
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.