473,394 Members | 2,052 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,394 software developers and data experts.

DataSet.ReadXml() - Malformed Xml?

If I try to read a CNET.com RSS feed into a DataSet, I get the following
exception

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

The exception is thrown immediately when I call
myDataSet.ReadXml(http://news.com.com/2547-1_3-0-5.xml);

Is the Xml is the RSS feed malformed?

Nov 18 '05 #1
3 1727
RSS feed is valid xml, but not valid for a dataset. datasets are stricter
about what xml they will support. you could use xlst to transform the RSS
feed to valid dataset.

-- bruce (sqlwork.com)
"George Durzi" <gd****@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
| If I try to read a CNET.com RSS feed into a DataSet, I get the following
| exception
|
| The same table (category) cannot be the child table in two nested
relations.
|
| The exception is thrown immediately when I call
| myDataSet.ReadXml(http://news.com.com/2547-1_3-0-5.xml);
|
| Is the Xml is the RSS feed malformed?
|
|
|
|
|
Nov 18 '05 #2
Thanks Bruce,
That makes sense. I'll look into the xslt method

"bruce barker" <no***********@safeco.com> wrote in message
news:eo**************@TK2MSFTNGP09.phx.gbl...
RSS feed is valid xml, but not valid for a dataset. datasets are stricter
about what xml they will support. you could use xlst to transform the RSS
feed to valid dataset.

-- bruce (sqlwork.com)
"George Durzi" <gd****@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
| If I try to read a CNET.com RSS feed into a DataSet, I get the following
| exception
|
| The same table (category) cannot be the child table in two nested
relations.
|
| The exception is thrown immediately when I call
| myDataSet.ReadXml(http://news.com.com/2547-1_3-0-5.xml);
|
| Is the Xml is the RSS feed malformed?
|
|
|
|
|

Nov 18 '05 #3
George, if you are looking to just display the RSS data in a Web page,
check out my free, open-source RssFeed server control:
http://scottonwriting.net/sowBlog/RssFeed.htm

Even if you need to parse out the RSS and work with it, you could strip
out the code in RssFeed that handles downloading and parsing through the
RSS content. RssFeed supports RSS versions 1.0 and 2.0, btw.

Happy Programming!

--

Scott Mitchell
mi******@4guysfromrolla.com
http://www.4GuysFromRolla.com

* When you think ASP.NET, think 4GuysFromRolla.com!
Nov 18 '05 #4

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

Similar topics

1
by: Jeffrey A. Voigt | last post by:
I'm having trouble loading some xml data into a dataset via the ReadXML call. I'm loading into the dataset an xml schema prior to the ReadXML call. I see that there IS in fact, 3 records that...
1
by: mr_dom_is | last post by:
Hi I have a little bit of trouble, probably missing the point now sure but: I have a dataset dim ds as new dataset("User") Which is populated with data from a database. When I use
8
by: Nikhilesh Mehendale | last post by:
I have written a web service in C#, .NET 1.1 which reads a XML file into a dataset. This is just a plain XML file. First I use the Dataset.ReadXmlScheme function and pass the XML file to it. Then...
1
by: kids_pro | last post by:
I had come across a code block from Loading a DataSet from XML (.NET Framework Developer's Guide) ---------------------------------------- NOte If you call ReadXML to load a very large file, you...
1
by: chrisn | last post by:
I want to store text with HTML tags in an XML field, and to do this I plan to use a CDATA field so that malformed HTML tags don't corrupt the XML file structure (I have no control over the format...
22
by: Arne | last post by:
How do I pass a dataset to a webservices? I need to submit a shoppingcart from a pocket PC to a webservice. What is the right datatype? II have tried dataset as a datatype, but I can't get it 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...
11
by: MurdockSE | last post by:
Greetings. My Situation: // I have an .xml file that I am reading into a dataset in the following code - DataSet ds = new DataSet("MyDataset"); ds.ReadXml(@"c:\data\"+cmyxmlfilename);
1
by: Mac | last post by:
I'm trying to validate input from an xml source to a dataset in dotnet2.0. As far as I can see, type errors correctly cause an exception, but values that are the correct type but do not satisify...
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: 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: 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
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...
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
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
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.