Click here to Skip to main content
14,428,725 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hello Everyone

I use the below code to get rss feed

protected void Page_Load(object sender, EventArgs e)

    string x = "xml url string";

        XmlTextReader reader = new XmlTextReader(x);
        DataSet ds = new DataSet();
        DataList1.DataSource = ds.Tables["item"];

but i get this error
An error occurred while parsing EntityName. Line 1, position 104.

How to solve this error?
Updated 4-Dec-15 12:51pm
Snesh Prajapati 4-Dec-15 18:30pm
I have updated below answer with more precise data and links. Hope That will be more helpful. Thanks.

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

Hi Amosh,

As per the code given by you, variable x is supposed to contain valid XML which is not there. Once you put a valid XML there, hopefully your code will work.

Valid XML is something like as given at[^]:
string x = "<TestDataXml><DataName>testing</DataName></TestDataXml>" ;

So correct that line and for more n valid XML please have a look at:[^][^]

A resolution for similar issue also given here:[^]


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100